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

Custom Sorting in Taipy Tables #2307

Open
1 of 7 tasks
FlorianJacta opened this issue Dec 6, 2024 · 0 comments
Open
1 of 7 tasks

Custom Sorting in Taipy Tables #2307

FlorianJacta opened this issue Dec 6, 2024 · 0 comments
Labels
🖰 GUI Related to GUI ✨New feature 🟩 Priority: Low Low priority and doesn't need to be rushed

Comments

@FlorianJacta
Copy link
Member

FlorianJacta commented Dec 6, 2024

Description:

Currently, Taipy’s built-in tables support basic sorting capabilities. However, there is no direct support for custom-defined sorting strategies. This can be limiting in scenarios where complex or domain-specific sorting logic is required. For example, users may want to sort by a custom metric, sort strings numerically, apply locale-aware sorting, or handle hierarchical data structures in a custom manner.

Proposed Solution:

Introduce a property or callback mechanism on Taipy table components that allows the developer to define a custom sorting function for each column.
The sorting function could be provided with the column’s current dataset subset and the sorting parameters (e.g., ascending/descending), and return a rearranged dataset.
Provide documentation and examples demonstrating how developers can implement their own sorting logic.

Example Use Case:

A user has a table of alphanumeric codes (e.g., "A10", "A2", "A100") and wants the table to sort them numerically rather than lexicographically so that "A2" < "A10" < "A100". Another user may need to integrate a custom business rule, like sorting by another hidden field or sorting dates with a custom parser.

Acceptance Criteria

  • If applicable, a new demo code is provided to show the new feature in action.
  • Integration tests exhibiting how the functionality works are added.
  • Any new code is covered by a unit tested.
  • Check code coverage is at least 90%.
  • Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@FlorianJacta FlorianJacta changed the title <write a small description here> Custom Sorting in Taipy Tables Dec 6, 2024
@FlorianJacta FlorianJacta added 🖰 GUI Related to GUI 🟩 Priority: Low Low priority and doesn't need to be rushed labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI ✨New feature 🟩 Priority: Low Low priority and doesn't need to be rushed
Projects
None yet
Development

No branches or pull requests

1 participant