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] Columns with initial flex width #16652

Open
misantronic opened this issue Feb 19, 2025 · 1 comment
Open

[data grid] Columns with initial flex width #16652

misantronic opened this issue Feb 19, 2025 · 1 comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Column resize status: waiting for author Issue with insufficient information

Comments

@misantronic
Copy link

misantronic commented Feb 19, 2025

Related page

https://mui.com/x/react-data-grid/column-dimensions/

Kind of issue

Missing information

Issue description

When using fluid width on (almost) all columns by default (flex: 1), this leads to weird behaviours when resizing a column. the resized column will keep the new width, but all other columns will take the newly space and realign.

What I would like to see is that when I resize a column in a data-grid that the fluid-width columns just keep their initial width, so that the columns don‘t jump around. Is that possible using the current implementation?

Screen.Recording.2025-02-19.at.15.20.50.mov

Context

No response

Search keywords: data-grid fluid width

@misantronic misantronic added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Feb 19, 2025
@michelengelen
Copy link
Member

This is not really possible without some custom logic. This is also stated here: Fluid width

As an alternative to fluid columns did you consider autosizing? This can also be done on mount with the props autosizeOnMount.

@michelengelen michelengelen added component: data grid This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information feature: Column resize and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Feb 19, 2025
@michelengelen michelengelen changed the title [docs] Data-Grid initial fluid width [data grid] Columns with initial flex width Feb 19, 2025
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: Column resize status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

2 participants