Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: table deselect doesn't work with few selected records #8692

Merged
merged 2 commits into from
Nov 24, 2024

Conversation

harshrajeevsingh
Copy link
Contributor

Fixes: #8665

Screencast.from.2024-11-23.00-33-14.webm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR fixes a bug in the table's deselect functionality where clicking the checkbox would incorrectly select all rows instead of deselecting when some rows were selected.

  • Modified RecordTableHeaderCheckboxColumn.tsx to properly handle 'some' selection state in the checked condition
  • Updated onChange handler logic to correctly deselect rows when checkbox is in 'some' or 'all' selected state
  • Removed unused event parameter from onChange handler for cleaner code
  • Ensures proper interaction between setHasUserSelectedAllRows and resetTableRowSelection states

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Thank you (again!)

@FelixMalfait FelixMalfait merged commit a19349b into twentyhq:main Nov 24, 2024
14 checks passed
Copy link

Thanks @harshrajeevsingh for your contribution!
This marks your 19th PR on the repo. You're top 2% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table Deselect doesn't work as expected
2 participants