nextui icon indicating copy to clipboard operation
nextui copied to clipboard

docs(components): error in selecting all

Open kuri-sun opened this issue 1 year ago • 6 comments

Closes #2313

📝 Description

When I select all in the table with 100 data(10 rows per page), go to the next page and uncheck one of the rows. It says "9 items are selected", however, it should say "99" not "9".

https://nextui.org/docs/components/table

⛳️ Current behavior (old)

https://github.com/nextui-org/nextui/assets/62743644/c9519d2e-0637-4e89-b0eb-90296f255d6e

🚀 New behavior

https://github.com/nextui-org/nextui/assets/62743644/e172c7fe-6f3f-4cfc-a190-aaca2773884a

  • When users select the "All" checkbox select all rows in the current table instead of selecting all rows table throughout the pages.

💣 Is this a breaking change (Yes/No):

No, Never touched the table component itself.

📝 Additional Information

No.

kuri-sun avatar Feb 10 '24 04:02 kuri-sun

⚠️ No Changeset found

Latest commit: ec8b4d2bc3de10e0be25ca248e9df65f40e0544e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Feb 10 '24 04:02 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2024 6:43am

vercel[bot] avatar Feb 10 '24 04:02 vercel[bot]

@kuri-sun is attempting to deploy a commit to the NextUI Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Feb 10 '24 04:02 vercel[bot]

Hi @kuri-sun,

Thank you for submitting this pull request. Could we consider adjusting the functionality slightly? I believe the intended behavior is to select all rows initially and then allow the user to deselect specific ones. For an example of this implementation, please refer to the row selection example here: TanStack Table Row Selection.

jrgarciadev avatar Feb 11 '24 13:02 jrgarciadev

@jrgarciadev I found a way to achieve the requirement. I will update the PR. Thank you! 😄

kuri-sun avatar Feb 13 '24 06:02 kuri-sun

@jrgarciadev, Here is the new behavior!✌️ I would like you to let me know that this behavior meets the requirements. Thank you! 😄

  • By selecting all rows initially and then allowing the user to deselect specific rows.

https://github.com/nextui-org/nextui/assets/62743644/0686ddf7-d8c9-41d4-9e6b-d712a5fa8ea3

kuri-sun avatar Feb 13 '24 06:02 kuri-sun