Skip to content

Commit

Permalink
Merge pull request #12 from jeremycook/patch-1
Browse files Browse the repository at this point in the history
Added forceDirty method to knockout.dirtyFlag.js
  • Loading branch information
johnpapa committed Feb 16, 2013
2 parents 74e897d + 77899e3 commit fbca551
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion knockout.dirtyFlag.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
result = function () {
var self = this;

self.forceDirty = function ()
{
_isInitiallyDirty(true);
};

self.isDirty = ko.computed(function () {
return _isInitiallyDirty() || hashFunction(_objectToTrack) !== _lastCleanState();
});
Expand All @@ -56,4 +61,4 @@

return result;
};
})(ko);
})(ko);

0 comments on commit fbca551

Please sign in to comment.