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

[data grid] Can't save default column width given by user in assigned treedata, is any way to do it? #12350

Closed
sludwikowski opened this issue Mar 6, 2024 · 4 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Tree data Related to the data grid Tree data feature support: question Community support but can be turned into an improvement

Comments

@sludwikowski
Copy link

sludwikowski commented Mar 6, 2024

Steps to reproduce

Current behavior

Currently, with the tree view, the tree date column does not save its width if the user changes it, the same error occurs again after refreshing.

Expected behavior

I would like the treedata column to save its width when it is changed by a user similarly to what happens with other columns.

Context

I want to target the width of the column to save, it is persistent with a large amount of data

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: treedatagroup, treedata, width, mui premium, mui datagrid, datagridremium

@sludwikowski sludwikowski added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 6, 2024
@michelengelen
Copy link
Member

Hi @sludwikowski ... I did play around with our demos a bit and could build an example where the state gets stored in localStorage and reapplied on reload: tree data state example.

Would this suit your needs?

@michelengelen michelengelen added support: question Community support but can be turned into an improvement component: data grid This is the name of the generic UI component, not the React module! feature: Tree data Related to the data grid Tree data feature status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 6, 2024
@michelengelen michelengelen changed the title Can't save default column width given by user in assigned treedata, is any way to do it? [data grid] Can't save default column width given by user in assigned treedata, is any way to do it? Mar 6, 2024
@sludwikowski
Copy link
Author

Unfortunately no, I used the solution from this example in my case, but unfortunately it did not help :/
Overall, the state of the other columns is fine, the worst is just in the case of tree data.
image

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Mar 6, 2024
@michelengelen
Copy link
Member

Well, it should work. Could you provide the code you applied for the state storage?

@michelengelen michelengelen added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 6, 2024
Copy link

github-actions bot commented Mar 7, 2024

⚠️ This issue has been closed.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.

How did we do @sludwikowski?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Tree data Related to the data grid Tree data feature support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants