How to log all selectedKeys
instead of 'all' in the Collections
#7182
-
Please check this link as an example https://getjustd.com/docs/components/collections/tree I hit the ⌘ Cmd + A, How do I get all Also how to disable the There is some strange behavior that if I have 10 items and I select them all manually with clicks I will have selectedKeys with size of 10 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks for the discussion. The special case for 'all' is to handle async collections of items where not all the keys are known up front. For more information, see https://react-spectrum.adobe.com/react-stately/selection.html#select-all |
Beta Was this translation helpful? Give feedback.
Thanks for the discussion. The special case for 'all' is to handle async collections of items where not all the keys are known up front.
If you would like to convert the 'all' to a set of keys, you can run a loop over your item collections and pull out the keys of each item.
For more information, see https://react-spectrum.adobe.com/react-stately/selection.html#select-all