[BUG] - Table selection - Unintuitive behaviour
NextUI Version
2.4.6? (the one currently used in the docs)
Describe the bug
Selecting all and then unselecting one has unexpected behaviour : it unselect all other pages ...
Selecting all then navigating to other pages show them all selected. Finally in the third page I found the record I'd like to exclude so I unselect it ... let's pretend I validate the hypothetical form happy of my work ... I actually did it all wrong because unselecting that one record unselected all other pages ...
Your Example Website or App
https://nextui.org/docs/components/table#use-case-example
Steps to Reproduce the Bug or Issue
- Got to the link
- Select all (using the "select all" in the table header)
- (OPTIONNAL) navigate to other pages, everything selected
- Unselect a single record (on whatever page)
- => all other pages are unselected
Expected behavior
When unselecting one row, I, as an end user, would expect only that row to be unselected ... I'm actually discovering the lib and played a little around but I didn't even notice it the first time : I navigated to second page after "selecting all" and was pleasantly surprised it worked accross pages. After that I unselected a single record and would have chosen the "action" in my application ... without ever realising only 3 records where selected and none anymore of all the other pages ...
Screenshots or Videos
Operating System Version
Windows 10
Browser
Chrome
I also ran into this myself recently. I can definitely see it causing confusion as it threw me off for a quick second when I encountered it. It could also potentially lead to mistakes taking place if a user is performing an action on multiple table items and thinks that all items in the table are selected except for a few. I think deselecting an item after having "all" selected should just deselect that single item.