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] Dynamic row height with column virtualization #7593

Open
2 tasks done
yukinko-iwasaki opened this issue Jan 17, 2023 · 2 comments
Open
2 tasks done

[data-grid] Dynamic row height with column virtualization #7593

yukinko-iwasaki opened this issue Jan 17, 2023 · 2 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature feature: Row height Related to the data grid Row height features plan: Pro Impact at least one Pro user support: commercial Support request from paid users

Comments

@yukinko-iwasaki
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

I have been trying to enable dynamic rowHeight in my dataGrid component.
This seems to disable the column virtualization. This hurts the performance of our app. I was wondering if there is any workaround to enable both dynamic height and the column virtualization.

Examples 🌈

https://codesandbox.io/s/mui-x-issue-template-forked-uekql7?file=/src/App.tsx

Here is the sandbox which renders 100 columns. We can see that all the columns are in the DOM when the dynamic row height is enabled.

Motivation 🔦

I need to enable dynamic row height to display long text data within the table.
However, this disables the column virtualization and it hurts our performance.

Order ID 💳 (optional)

51377

@yukinko-iwasaki yukinko-iwasaki added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 17, 2023
@yukinko-iwasaki yukinko-iwasaki changed the title [dataGrid] Dynamic row height with column visualization [data-grid] Dynamic row height with column visualization Jan 17, 2023
@cherniavskii
Copy link
Member

Hi @yukinko-iwasaki
Indeed, column virtualization is disabled when using dynamic row height. This is expected:

Note that, due to the implementation adopted, the virtualization of the columns is also disabled to force all columns to be rendered at the same time.
https://mui.com/x/react-data-grid/row-height/#dynamic-row-height

We are exploring alternative solutions for the long content of the cell in #7323

You might find these demos useful as an alternative solution for long content in the cell without using dynamic row height:

@cherniavskii cherniavskii 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 status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it support: commercial Support request from paid users feature: Row height Related to the data grid Row height features plan: Pro Impact at least one Pro user and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 18, 2023
@m4theushw
Copy link
Member

We could explore an alternative path of allowing to specify which column should be used for dynamic row height, then re-enable column virtualization but always render this column, keeping it hidden. The row height would be determined only by the height of this column.

@cherniavskii cherniavskii added enhancement This is not a bug, nor a new feature and removed status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it status: waiting for author Issue with insufficient information labels Jan 18, 2023
@m4theushw m4theushw changed the title [data-grid] Dynamic row height with column visualization [data-grid] Dynamic row height with column virtualization Jan 20, 2023
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! enhancement This is not a bug, nor a new feature feature: Row height Related to the data grid Row height features plan: Pro Impact at least one Pro user support: commercial Support request from paid users
Projects
None yet
Development

No branches or pull requests

3 participants