-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data-grid] Keep newly created row in viewport #4160
Comments
I would be curious to see how other grids handle this topic. You can also scroll to the newly created row. Without pagination it's easy, with pagination you would first need to go to the right page, which can be tricky in some scenarios (especially with variable row height) |
It turns out that this is what other grids do. For instance, AG Grid doesn't re-sorts the rows after changing the value of a cell from a sorted column. To implement this in the DataGrid it wouldn't be very complex. In |
The AG Grid page regarding this topic: https://www.ag-grid.com/javascript-data-grid/change-detection/#change-detection-and-sorting-filtering-grouping We can ignore the sorting / filtering / grouping update (probably harder to achieve for grouping) when the update comes from editing. |
@flaviendelangle interesting, if we are to add this method will it only return a value different from |
Different from But yes, I think that if the pagination is disabled, we could early return a |
Our equivalent is
My idea was to have a param in |
For me in AG Grid, handles the rows in a very different way that we do.
In this example, they say to the user to manually do So as far as I understand, they still have 1 call to If we add a param on |
Order ID 馃挸
#37886
Duplicates
Latest version
The problem in depth 馃攳
Inline editing, which can be seen in the example control-with-external-buttons
When sorting rows by name, and after that a new record is added, depending on the name, the row would end up either on top, in the middle or at the bottom of the list. It is inconvenient to have to see the row disappear out of view (if user keeps looking at the top section of the table), immediately after being added. Is it possible to prevent that from happening and instead always add the new row at the top?
At the same time, when pagination is added the row ends up at the bottom of the list (on page 4 for example, when user is still looking at page nr 1) so user doesn鈥檛 really get to see the row being added. Do you have a solution for that?
Similar issues
Your environment 馃寧
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: