-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: Allow resetting sort for taipy tables #2751
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
base: develop
Are you sure you want to change the base?
Conversation
|
This PR has been labelled as "π₯ΆWaiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this PR, then please add new commit or another comment, otherwise this PR will be closed in 14 days. For more information please refer to the contributing guidelines. |
|
This PR has been labelled as "π₯ΆWaiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this PR, then please add new commit or another comment, otherwise this PR will be closed in 14 days. For more information please refer to the contributing guidelines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a three-state sorting cycle for Taipy tables, allowing users to transition between unsorted, ascending, and descending states. Previously, once sorting was applied, users could only toggle between ascending and descending until the page was refreshed.
Key Changes:
- Modified sorting click handler to cycle through: unsorted β ascending β descending β unsorted
- Applied the same logic to both
PaginatedTableandAutoLoadingTablecomponents - Added unit test coverage for
PaginatedTableto verify the three-state sorting behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
frontend/taipy-gui/src/components/Taipy/PaginatedTable.tsx |
Updated onSort callback to implement three-state sorting logic (unsorted β asc β desc β unsorted) |
frontend/taipy-gui/src/components/Taipy/PaginatedTable.spec.tsx |
Added test case to verify the three-state sorting cycle behavior |
frontend/taipy-gui/src/components/Taipy/AutoLoadingTable.tsx |
Applied identical three-state sorting logic to maintain consistency with PaginatedTable |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Would need a doc update ?
@rzats can you update your branch ?
What type of PR is this? (Check all that apply)
Description
Lets users cycle through sorting states in tables:
unsorted β ascending β descending β unsorted. Previously, choosing to sort a table "locked you in" to either ascending or descending sorting until the page was refreshed.Related Tickets & Documents
How to reproduce the issue
By using the example code from the original issue :)
Backporting
This change should be backported to:
Checklist
We encourage keeping the code coverage percentage at 80% or above.
If not, explain why:
If not, explain why: simple feature
If not, explain why: simple feature
If not, explain why: done by maintainers?