fix(SelectionManager): support full collection for select all functionality#9621
fix(SelectionManager): support full collection for select all functionality#9621reidbarber wants to merge 6 commits intomainfrom
Conversation
|
Build successful! 🎉 |
LFDanLu
left a comment
There was a problem hiding this comment.
This seems to work well for fixed collections, but what do you think about async loaded items or if the wrapped collection has controlled items (i.e. the filtering is handled externally and items constantly changes causing fullCollection to change)? I suppose for that case it would reasonable to expect selected keys to be tracked outside the component itself?
I think it'd be good to have some tests for some of these. It'd help me to reason about it. |
|
Build successful! 🎉 |
LFDanLu
left a comment
There was a problem hiding this comment.
I think the current behavior should be fine, since as mentioned previously it would be best for Autocompletes with controlled items (aka fetching a list of items or performing server side filtering) to have their selection controlled and tracked by the user/app.
|
Build successful! 🎉 |
Closes #9620
When you had a collection with
'all'selected inside an Autocomplete, then filtered down the collection and toggled an item, the'all'selection internally was only including filtered items' keys, so you'd lose selection for all non-visible items.This adds a
fullCollectionfield so we can still access the unfiltered collection when toggling selection.✅ Pull Request Checklist:
📝 Test Instructions:
Test new story: