Skip to content

Enable sort on multiple columns#69

Merged
severo merged 12 commits intomasterfrom
enable-sort-on-multiple-columns
Mar 21, 2025
Merged

Enable sort on multiple columns#69
severo merged 12 commits intomasterfrom
enable-sort-on-multiple-columns

Conversation

@severo
Copy link
Copy Markdown
Contributor

@severo severo commented Mar 11, 2025

  • change the behavior of the clicks on the column headers: the clicked column becomes the first column in OrderBy, with direction ascending, if it was not the first one. If it was the first one, cycle through: ascending -> descending -> none.
  • process any number of column sorts in sortableDataFrame (instead of 0 or 1 before): sort along the first column, then use the second one in case of ties, etc.
  • handle multiple columns in OrderBy in rows selection

cc @platypii: there are numerous TODOs in the code because there are plenty of opportunities to optimize (ie. to avoid doing the same again and again). I think we can work on optimizing in another PR (and I can better move these TODOs to a specific issue), though, because it could require changing a bit the format of DataFrame. Interested in your thoughts on how we could optimize.

@severo severo marked this pull request as draft March 11, 2025 17:45
@severo severo changed the base branch from master to enable-descending-order March 11, 2025 17:45
Base automatically changed from enable-descending-order to master March 11, 2025 18:22
@severo severo force-pushed the enable-sort-on-multiple-columns branch from b2cfe38 to 0d79851 Compare March 11, 2025 21:30
@severo severo force-pushed the enable-sort-on-multiple-columns branch from 0d79851 to 76ad372 Compare March 19, 2025 08:43
@severo severo force-pushed the enable-sort-on-multiple-columns branch from 645ce4e to 238b639 Compare March 19, 2025 22:20
@severo severo force-pushed the enable-sort-on-multiple-columns branch from 10093a4 to d2dbc16 Compare March 20, 2025 10:43
@severo severo requested a review from platypii March 20, 2025 14:16
@severo severo marked this pull request as ready for review March 20, 2025 14:16
Copy link
Copy Markdown
Contributor

@platypii platypii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!

@severo severo merged commit 81f56ab into master Mar 21, 2025
8 checks passed
@severo severo deleted the enable-sort-on-multiple-columns branch March 21, 2025 09:02
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.

2 participants