A common use case for users is to add a new row which gets filtered out by the column filter condition or added in a location that's out of view. This can make users doubt whether the row was actually added. However, we don't have a single solution to resolve this UX issue that is going to fit all possible usage scenarios.
Nevertheless, here are a few approaches that might work for you depending on your requirements.
Pinned rows
You could leverage the pinned rows and momentarily pin/unpin the newly added row:
https://www.ag-grid.com/javascript-grid-row-pinning/
Cell flashing
You can flash the cells for the newly added row as shown here:
https://www.ag-grid.com/javascript-grid-data-update/#flashing
Post sort
You can leverage the post sort to try to position newly added rows where you want them to be:
https://www.ag-grid.com/javascript-grid-sorting/#post-sort
The examples below showcase how to use post sort while grouping:
Filter - Custom comparator
You can write a custom comparator so new rows are never filtered out of the view
https://www.ag-grid.com/javascript-grid-filter-text/#text-custom-comparator
Note that we don't plan to provide any examples for this because the implementation will be quite different depending your specific requirements.
Note also that you can combine these approaches as necessary to better suit your needs. If you think that there is a better approach that we should support, please let us know and we will consider it.
Comments
0 comments
Please sign in to leave a comment.