Skip to content

fix(ui): reflect default sort in join tables #12084

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

coreyleelarson
Copy link
Contributor

What?

This PR ensures defaultSort is reflected in join tables.

Why?

Currently, default sort is not reflected in the join table state. The data is sorted correctly, but the table state sort is undefined. This is mainly an issue for join fields with orderable: true because you can't re-order the table until order is the selected sort column.

How?

Added defaultSort prop to the <ListQueryProvider /> in the <RelationshipTable /> and ensured the default state gets set in <ListQueryProvider /> when modifySearchParams is false.

Before:

Screenshot 2025-04-11 at 2 33 19 AM

After:

Screenshot 2025-04-11 at 3 04 07 AM

Fixes #12083

@coreyleelarson coreyleelarson changed the title fix: reflect default sort in join tables fix(ui): reflect default sort in join tables Apr 11, 2025
@GermanJablo GermanJablo self-assigned this Apr 11, 2025
@GermanJablo GermanJablo self-requested a review April 11, 2025 09:20
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.

Join table state does not reflect default sort
2 participants