Skip to content

Conversation

Libertrue
Copy link

@Libertrue Libertrue commented Oct 10, 2025

What does this PR do?

Fixes #2146

This PR introduces/refactors/...

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

Copy link
Member

@KoalaSat KoalaSat left a comment

Choose a reason for hiding this comment

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

Hey @Libertrue , thanks for your code. I tested it and it looks like once you select the type 'sell/buy' the premium sorting gets locked and you are no longer able to sort by any different column.

That's likely because sortModel is static here and DataGrid is no longer able to modify it internally. Try checking here https://mui.com/x/react-data-grid/ in case you can subscribe to any sort of SortModel's hook .

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.

Sort by premium when the order type is defined

2 participants