title: Knockout checkbox change event sends old value
body: <p>I'm having a problem with knockout "checked" binding. It seems that "change" event at checkbox return old value, before it is updated(so if it was unchecked it will return false). I don't think that I can subscribe to the value since I have it inside object.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;tbody data-bind="foreach: Categories"&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;input type="checkbox" data-bind="checked: ShowOpened, event: { change: $root.CategoryChange }" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
  &lt;script type="text/javascript"&gt;
  var Category = function (Id, Name, Order, ShowOpened) {
      this.Id = Id;
      this.Name = Name;
      this.Order = Order;
      this.ShowOpened = ShowOpened;
      this.IsUpdated = ko.observable(false);
  
      this.OldOrder = Order;
      this.OldShowOpened = ShowOpened;
  };
  var ViewModel = {
      Categories: ko.observableArray([]),
      CategoryChange: function(pCategory) {
          if(pCategory.Order != pCategory.OldOrder || pCategory.ShowOpened != pCategory.OldShowOpened)
              pCategory.IsUpdated(true);
          else
              pCategory.IsUpdated(false);
      }
  };
  ko.applyBindings(ViewModel);
  &lt;/script&gt;
  </code></pre>
  
  <p>So in this example I have ShowOpened checkbox that can trigger CategoryChange method that will change a variable inside object(that I need later to know what object are updated). But when the chechbox is changed it always send out the old value, triggering method, and then changes the value. Is there any way to fix this?</p>