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

[XGrid] columns are reordered when onSelectionChange modifies some unbound datagrid data #936

Closed
2 tasks done
McFoggy opened this issue Jan 27, 2021 · 4 comments · Fixed by #950
Closed
2 tasks done
Assignees
Labels
bug 🐛 Something doesn't work

Comments

@McFoggy
Copy link

McFoggy commented Jan 27, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When onSelectionChange update some data (even unrelated to what is bound to the datagrid) then the column order is reset

See reproducer from fork of your sample XGrid example : https://codesandbox.io/s/material-demo-forked-r36ci

Expected Behavior 🤔

The selection does not change the column ordering.

Steps to Reproduce 🕹

The columns are reordered to the default state for no reason.

Context 🔦

In a trial to evaluate your product we faced this issue.

Your Environment 🌎

A fork of your sample on codesandbox

@McFoggy McFoggy added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 27, 2021
@dtassone
Copy link
Member

I can't reproduce your issue 🤔

@oliviertassinari
Copy link
Member

@dtassone You need to uncomment // setMyState(!myState);

@McFoggy
Copy link
Author

McFoggy commented Jan 28, 2021

sorry I didn't realized that I have saved the comment.
I have removed it, the error can be reproduced out of the box.

@dtassone dtassone added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 28, 2021
@dtassone dtassone self-assigned this Jan 29, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 30, 2021

I have created a new reproduction to show that it's not an issue with the selection feature: https://codesandbox.io/s/material-demo-forked-4s6qs?file=/package.json, it seems related to the columns and reorder feature.

@oliviertassinari oliviertassinari changed the title columns are reordered when onSelectionChange modifies some unbound datagrid data [XGrid] columns are reordered when onSelectionChange modifies some unbound datagrid data Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants