ServerSideRowModel - 立即删除过滤器和排序,而不会导致调用 `dataSource.getRows` 两次

ServerSideRowModel - Remove filters and sorting at once without causing calls to `dataSource.getRows` twice

我们有一个场景,我们需要删除列过滤器和排序,然后 purgeServerSideCache

问题在于,当我们执行 filterManager.setFilterModel(null) 然后 gridApi.setSortModel(null) 时,两个单独的 dataSource.getRows 调用被解雇 - 我想避免这种情况。

我该怎么做才能删除过滤器模型和排序模型,以便 dataSource.getRows 方法只被调用一次?

如文档中所述,https://www.ag-grid.com/javascript-grid-server-side-model-configuration/#configurations

blockLoadDebounceMillis: Prevents blocks loading until scrolling has stopped for the specified number of milliseconds. When row count (i.e. lastRowIndex) is known, setting this property will enable skipping over blocks when scrolling.

blockLoadDebounceMillis of gridOptions 可用于设置滚动的去抖时间。同样也可以用在这里。最终它用于为 dataSource.getRows 方法设置去抖时间。