-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Allow for truncated and multiline content in grid cells #3955
[DataGrid] Allow for truncated and multiline content in grid cells #3955
Conversation
These are the results for the performance tests:
|
packages/grid/_modules_/grid/components/containers/GridRootStyles.ts
Outdated
Show resolved
Hide resolved
What if we introduce const content = children != null ? children : valueToRender?.toString();
// ...
{noWrap ? <div className={classes.content}>{content}</div> : content} This will allow to control whether the content is wrapped or not, regardless |
@cherniavskii I was thinking of adding another option to the |
If you mean #3587, then it will be fixed by default with no configuration.
What about the one you mentioned in PR description?
|
Adding |
that is already fixed by keeping the |
@cherniavskii Whether we add |
Ok, I didn't notice that change. It's great then!
I like this! |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
…truncated-cell-content
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.
Looks good.
Fixes #3587
I added 2 snaps to make sure that we don't break it again.
To fix this I had to wrap the content of the cell in a
div
element. If arenderCell
is provided its return value won't be wrapped in thatdiv
element.Storybook: https://deploy-preview-3955--material-ui-x.netlify.app/storybook/?path=/story/datagridpro-test-styling--truncated-cell-text-snap