Created
April 11, 2013 16:05
-
-
Save yuanmai/5364685 to your computer and use it in GitHub Desktop.
KO invalidates other fields http://jsfiddle.net/yuanmai/NQ27W/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ko.extenders.invalidatedBy = function(target, which) { | |
which.subscribe(function(newValue) { | |
target(""); | |
}); | |
return target; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment