Skip to content

Conversation

@rzats
Copy link

@rzats rzats commented Oct 22, 2025

What type of PR is this? (Check all that apply)

  • πŸ›  Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • ⚑ Optimization
  • πŸ“ Documentation Update

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 :)

import taipy.gui.builder as tgb
from taipy import Gui

data = {"Sentence": "Eddie ate dynamite, good bye Eddie".split(" ")}

with tgb.Page() as page:
    tgb.table("{data}")

if __name__ == "__main__":
    Gui(page=page).run()

Backporting

This change should be backported to:

  • 3.0
  • 3.1
  • 4.0
  • develop

Checklist

We encourage keeping the code coverage percentage at 80% or above.

  • βœ… This solution meets the acceptance criteria of the related issue.
  • πŸ“ The related issue checklist is completed.
  • πŸ§ͺ This PR includes unit tests for the developed code.
    If not, explain why:
  • πŸ”„ End-to-End tests have been added or updated.
    If not, explain why: simple feature
  • πŸ“š The documentation has been updated, or a dedicated issue has been created.
    If not, explain why: simple feature
  • πŸ“Œ The release notes have been updated.
    If not, explain why: done by maintainers?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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.

@github-actions github-actions bot added the πŸ₯ΆWaiting for contributor Issues or PRs waiting for a long time label Nov 6, 2025
@arcanaxion arcanaxion removed the πŸ₯ΆWaiting for contributor Issues or PRs waiting for a long time label Nov 7, 2025
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the πŸ₯ΆWaiting for contributor Issues or PRs waiting for a long time label Nov 21, 2025
@arcanaxion arcanaxion removed the πŸ₯ΆWaiting for contributor Issues or PRs waiting for a long time label Nov 21, 2025
Copilot finished reviewing on behalf of FredLL-Avaiga November 24, 2025 15:36
Copy link
Contributor

Copilot AI left a 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 PaginatedTable and AutoLoadingTable components
  • Added unit test coverage for PaginatedTable to 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.

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a 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 ?

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.

[✨ FEATURE] Allow resetting sort for taipy tables

4 participants