Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [sparkle] - refactor: streamline sorting state management in DataTable - Removed local sorting state in favor of external sorting prop management - Added conditional rendering for the sorted row model based on the existence of sorting props - Adjusted DataTable stories to handle the new sorting state management - Cleaned up unused SortingFn import and initialColumnOrder prop - Implemented and utilized an onSortingChange helper for setting sorting state only when applicable * [sparkle] - fix: correct placeholder text in DataTable stories - Fixed a typo in the 'filter' input placeholder within the DataTable stories component to enhance clarity. * [sparkle] - refactor: streamline client-side sorting in DataTable component - Add a conditional check for client-side sorting to decide whether to apply manual sorting logic - Include the sorting state and onSortingChange handler conditionally based on client-side sorting - Remove duplicated logging statement in DataTable stories file * [sparkle] - fix: correct flag for server-side sorting in DataTable - Changed the flag from `isClientSideSorting` to `isServerSideSorting` to properly reflect server-side handling - Updated sorting logic to engage server-side sorting instead of client-side when required - Altered conditionals for row model getters to align with the server-side sorting feature * [sparkle] - feature: enable client-side sorting for DataTable component - Introduced a flag to allow client-side sorting when server-side sorting and pagination are not in use - Removed hardcoded server-side sorting from the DataTablePaginatedExample story to rely on client-side behavior - Cleaned up console logging and unused sorting state in DataTablePaginatedServerSideExample story * [sparkle] - feature: bump package version to 0.2.241 - Update the version of the @dust-tt/sparkle package for release * [sparkle] - feature: enable toggle for server-side sorting in DataTable - Introduced `isServerSideSorting` prop to allow switching between server-side and client-side sorting - Defaulted `isServerSideSorting` prop to false to preserve client-side sorting unless specified [sparkle] - test: add story example for DataTable with client-side sorting - Created a new DataTable story to demonstrate client-side sorting functionality - Provided an interactive example with filter and sorting state management in the story * [sparkle] - refactor: remove trailing whitespace in DataTable stories - Cleaned up formatting in the DataTable.stories.tsx to enhance code readability * Update sparkle/src/components/DataTable.tsx Co-authored-by: Thomas Draier <[email protected]> --------- Co-authored-by: Jules <[email protected]> Co-authored-by: Thomas Draier <[email protected]>
- Loading branch information