Column filter is lost when updating row data in ag-grid

I'm trying to pre-configure a column filter in an ag-grid, a simple text filter "equals" to only show rows matching certain text, it works for me.

However, as soon as I replace the model data with a new set of rows, my filter disappears.

I tried to update the model data in two ways:

  • replacing the value of the associated rowData property (I am using Vue.js)
  • call api.setRowData (newRows)

Both of these cause the column filter to be lost.

Is there a way to update the model data without losing the column filters?

+3


source to share


1 answer


Its documentation says that you can set a property gridOptions

deltaRowDataMode=true

and then use api.setRowData(newRows)

. This will compare the current row data with the new data to see what has changed and updated accordingly. Without this property, the grid will rip out all settings to allow a fresh start.



+3


source







All Articles