Tracking array adds and removes is not quite as simple as it first appears...
This file contains 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
// Initialise array with some data and track changes | |
var trackedArray = ko.observableArray([1,2,3]).extend({trackArrayChanges: true}); | |
trackedArray.getChanges(); | |
// -> { } No changes yet | |
trackedArray.push(4); | |
trackedArray.pop(); | |
trackedArray.getChanges(); | |
// -> { } Changes have negated each other |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment