-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[DataGrid] Introduce a maxWidth
property in GridColDef
#3550
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
These are the results for the performance tests:
|
@flaviendelangle I have tried the use case raised in #2174 (comment) (reading the git diff, I had a few doubts about the correctness). It doesn't seem to work correctly. I would expect the last column of the second demo to be full-width. Proof: https://codesandbox.io/s/columnsizinggrid-material-demo-forked-nhcv3?file=/package.json. <div style={{ height: 200, width: "100%" }}>
<DataGridPro
columns={[
{ field: "id" },
{ field: "username", width: 100 },
{ field: "age", resizable: false, flex: 1 }
]}
rows={rows}
/>
</div>
<div style={{ height: 200, width: "100%" }}>
<DataGridPro
columns={[
{ field: "id" },
{ field: "username", flex: 1, maxWidth: 100 },
{ field: "age", resizable: false, flex: 1 }
]}
rows={rows}
/>
</div> I have tried with AG Grid, it seems correct: https://plnkr.co/edit/WJCcSwIr69GwJdoc. How about we open a new GitHub issue? |
You are right 👍 |
Closes #2174
The next step would be to improve the flex behavior to respect the CSS specification (#3091 for instance).
https://deploy-preview-3550--material-ui-x.netlify.app/components/data-grid/columns/#resizing