Skip to content
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

Use previous columns for reorder logic #414

Merged
merged 1 commit into from
Nov 28, 2021

Conversation

jscholar
Copy link
Contributor

Related Issue

Description

Addresses issue where column sorting will unintentially revert to default when props other than the defaultSort changes (such as the data).

Originally, a comparison was made between column props and current sorting. This changes the comparison to between column props and prev column props, which should better capture the intent of the previous PR.

Fixes boolean logic for comparing sorting states.

Related PRs

Impacted Areas in Application

  • Column sorting

* See:
   * mbrn/material-table#1975
   * material-table-core#48 (comment)
* Addresses issue where column sorting will unintentially revert to default when props other than the defaultSort changes (such as the data)
* Originally, a comparison was made between column props and current sorting. This changes the comparison to between column props and prev column props.
* Fixes boolean logic for comparisons

* Tested against original reproduction example provided in mbrn/material-table#1868
@jscholar jscholar requested a review from oze4 as a code owner November 23, 2021 23:49
@Domino987 Domino987 merged commit 1cae237 into material-table-core:master Nov 28, 2021
@jscholar
Copy link
Contributor Author

Thank you. Can I ask when the next release might be?

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.

None yet

2 participants