Skip to content

enable sorting in descending order#68

Merged
severo merged 2 commits intomasterfrom
enable-descending-order
Mar 11, 2025
Merged

enable sorting in descending order#68
severo merged 2 commits intomasterfrom
enable-descending-order

Conversation

@severo
Copy link
Copy Markdown
Contributor

@severo severo commented Mar 11, 2025

The table can now be ordered by a column in descending order. When clicking on a column header, we follow the cycle: none -> ascending -> descending -> none...

See #67 for a previous PR where I changed orderBy: {column: string} to orderBy: {column: string}[]. In this PR, we change it again to orderBy: {column: string, direction: 'ascending' | 'descending'}[].

Issue: #15

in comparison to #15 (comment), I decided that for now, orderBy has to be an array, and it has to contain the two properties: column and direction. We might want to loosen these types later, but I'm not sure it's a good idea, as it creates more special cases, and is not really needed.

(remaining, in another PR: sort by multiple columns)

@severo severo requested a review from platypii March 11, 2025 13:56
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.

Looks good!

@severo severo merged commit 1cc2247 into master Mar 11, 2025
@severo severo deleted the enable-descending-order branch March 11, 2025 18:22
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