Open annawatson-wk opened 16 hours ago
Strongly related to #14802 ... The main problem seems to be that the grid needs to recalculate the row height and scrolls to the specific row being edited. If I remember this right we had this discussion somewhere else The main problem here is the virtualization. The grid has to know all rows heights to precisely scroll to the point where it needs to, but without the rows actually being rendered we cannot do that. Not sure if we can support something like this.
I don't know if this would be a viable solution for you, but you can always disable the virtualization if it fits your use case: Disable virtualization
@romgrk might be able to dive a bit deeper into this topic.
Steps to reproduce
Link to live example: https://stackblitz.com/edit/react-yiiuuw?file=Demo.tsx
Steps:
TextField
.TextField
, note the new row numberCurrent behavior
When you edit the
TextField
and exit theTextfield
the row in the viewport jumps to show another row which was not being edited.Expected behavior
When you edit the
TextField
and exit theTextfield
the row in the viewport shows the same row which was being edited.Context
We had a customer report this jumping behavior when pasting. It's only an issue when using a
TextField
inrenderEditCell
in the column definition andgetRowHeight={() => 'auto'}
. Ideally we'd like the row that was being edited in the viewport in view in some capacity.Your environment
``` System: OS: macOS 13.6.2 Binaries: Node: 20.8.1 - ~/.asdf/installs/nodejs/20.8.1/bin/node npm: 10.1.0 - ~/.asdf/plugins/nodejs/shims/npm Browsers: Chrome: 129.0.6668.71 ```npx @mui/envinfo
Search keywords: data grid premium pro textfield renderEditCell TextField rows scroll jump getRowHeight={() => 'auto'} Order ID: 82849