import { GridOptions , SetFilterValuesFuncParams } from '@ag-grid-community/core' ; var filterParams = { values : function ( params ) { setTimeout ( function ( ) { params . success ( [ 'value 1' , 'value 2' ] ) ; } , 3000 ) ; } , } ; const gridOptions = { rowData : [ { value : 'value 1' } , { value : 'value 1' } , { value : 'value 1' } , { value : 'value 1' } , { value : 'value 2' } , { value : 'value 2' } , { value : 'value 2' } , { value : 'value 2' } , { value : 'value 2' } , ] , columnDefs : [ { headerName : 'Set filter column' , field : 'value' , flex : 1 , filter : 'agSetColumnFilter' , floatingFilter : true , filterParams : filterParams , } , ] , } ; document . addEventListener ( 'DOMContentLoaded' , function ( ) { var gridDiv = document . querySelector ( '#myGrid' ) ; new agGrid . Grid ( gridDiv , gridOptions ) ; } ) ;