You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Code of Conduct
The text was updated successfully, but these errors were encountered: