Formerly in ag-grid version <10.1.0 a row could be added without refreshing the grid in this way:
let model: IRowModel = this.gridOptions.api.getModel();
const skipRefresh = true;
model.addItems( [ obj ], skipRefresh );
Since ag-grid 10.1.0 the addItems() method is deprecated and has been removed completely. The documentation says to use updateRowData() instead:
this.gridOptions.api.updateRowData( { add: [ obj ] } );
The problem is that updateRowData() does always refresh the grid. That drags down the performance of our grid extremely.
How do I add rows without having the grid refreshed automatically in current ag-grid version?
Suppressing ag-grid's new change detection by setting suppressChangeDetection=true That didn't help. Refresh is still done.
The problem is that updateRowData() does always refresh the grid." This is not true. api.updateRowData() does not trigger a full refresh. there must be something else you are doing that is causing this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With