-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BindingList changes #22
Comments
I think the best approach would be to create a custom Knockout binding that binds to binding lists the same way Knockout currently does to observable arrays. |
Good idea, will implement something once Roman gets his version of observable arrays into the harness. |
Meh it looks like we'll need a way to keep two binding lists in sync though, just for viewmodel lists vs. harness lists. Maybe WinRT or WinJS has something already---it's such an obvious thing to do. I'll ask StackOverflow. |
ORRRR we could let the custom binding take a view model mapper O_o. div(data-win-control="ListView" data-bind="list: theList, listConverter: theConverter") function TermsListViewModel(termsBindingList) {
this.list = termsBindingList;
this.listConverter = function (term) {
return new TermsViewModel(term);
};
} I guess maybe this just moves the synchronization code into the custom binding though, which isn't a huge win necessarily. Hmm. |
ORRR we could do the view model mapping as part of the |
We need a helper to easily map binding list changes to ko observable arrays.
Currently this is what we have going on in Beretta:
So two issues, need a helper, and need to listen to all events.
The text was updated successfully, but these errors were encountered: