nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Table selection - Unintuitive behaviour

Open kjorand opened this issue 1 year ago • 2 comments

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

  1. Got to the link
  2. Select all (using the "select all" in the table header)
  3. (OPTIONNAL) navigate to other pages, everything selected
  4. Unselect a single record (on whatever page)
  5. => 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

chrome_B1bxPTjdhX

Operating System Version

Windows 10

Browser

Chrome

kjorand avatar Sep 07 '24 09:09 kjorand

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.

Kismet333 avatar Jun 14 '25 06:06 Kismet333