Skip to content
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

Add support for Notify collection changes with multiple items #105

Closed
vicmaeg opened this issue Feb 15, 2019 · 3 comments
Closed

Add support for Notify collection changes with multiple items #105

vicmaeg opened this issue Feb 15, 2019 · 3 comments
Assignees

Comments

@vicmaeg
Copy link

vicmaeg commented Feb 15, 2019

Hello,

First of all, congratulations for this amazing javascript<->C# bridge framework

We are starting to use neutronium in order to display some views in our app using Vue.js. We have ViewModels that contains a property of type ObservableRangeCollection, similar to this:
https://gist.github.com/weitzhandler/65ac9113e31d12e697cb58cd92601091

when we Use the AddRange and RemoveRange to add/remove multiple elements, but with just one collection changed event, we see that Neutronium bindings just updates one element.
I see that the problem is here: https://github.com/NeutroniumCore/Neutronium/blob/master/Neutronium.Core/Binding/Updaters/CollectionJavascriptUpdater.cs#L39 just manages one element at a time even if the NewItems, or OldItems contains more than one element.

We have modified our ObservableRangeCollection to send multiple events one for each change.
if we have time we can change it and open a pull request with the needed changes on order to support multiple elements in collection changes.

Thank you

@David-Desmaisons
Copy link
Member

Hello @vmartos , thanks for your words.
PRs are always welcome. That said in that case I may ba abble to take a look in a short time. I will let you know.

@David-Desmaisons
Copy link
Member

It is delivered in version 1.5.2. The other good news is that Neutronium implementation of range updates are optimized compared individual updates.

@vicmaeg
Copy link
Author

vicmaeg commented Feb 18, 2019

@David-Desmaisons That was fast! I'll update to the last version. Thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants