fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.15k stars 122 forks source link

Fix an issue in BindableHelpers.onBindingContextChanged #748

Closed TimLariviere closed 4 years ago

TimLariviere commented 4 years ago

Potential fix for #733 Fixed an issue in BindableHelpers.onBindingContextChanged and also separated the collection diffing algorithm into 2 kinds: Children/Items.

The diffing algorithm for Items is less aggressive on reuse to avoid unwanted reordering animation, and will only reorder for same instance or same key, otherwise it only tries to reuse on the same index.

The diffing algorithm for Children will try to reuse all elements, even if the indexes are not matching.