Open ashi009 opened 7 years ago
Hi!
This is actually by design – the challenge is that we're comparing the item objects to determine if they're selected or not and the assumption is that when filtering/sorting happens, data is fetched again from the remote data source and items get replaced by new objects.
Now, this isn't of course true when using an array data source, but I've used this approach there also for coherence.
I'm considering exposing attr-for-selected
or similar to configure which subproperty would be used for determining the selection, which would allow a behavior where the selection gets never cleared. How would it sound?
As an side effect, filter and sort will clear selection, which might be unintended (especially for sorting)
Hence, I think it should either preserving the selection (might be hard to implement) or at least showing a warning message before clearing the selection.