knockout.mapping
knockout.mapping copied to clipboard
[Feature Request] Incremental update on observable arrays
Regarding this post in Google Group, I am trying to build a web app this knockout mapping, but it requires working on a very large paged collection (observableArray).
Took a look on the debug code, and I came up with a few ways to implement this feature.
So I would like to know if the developers have a plan in mind for this, or we can discuss how should I contribute in a pull request.
The plugin is designed to always take the full state from the server and map it to the state in javascript. If you want to work with subsets, you will have to design your model to split up the array or map only the smaller subsets.
I can implement this upon current code of knockout.mapping, just dun know how the mapping syntax should be. How about adding an "increment" option in the mapping object?
Hi, I have a fiddle that demonstrate a solution: http://jsfiddle.net/LHeQZ/45/
Best
Nice approach, in fact I picked a similar way and simply made that as the default behaviour in .fromJS()
. I don't thihk a full state is much needed whatsoever, people can .removeAll()
by themselves if they mean so.