import { ColDef , GridOptions } from '@ag-grid-community/core' ; declare var NumberFloatingFilterComponent ; const columnDefs = [ { field : 'athlete' , filter : false } , { field : 'gold' , filter : 'agNumberColumnFilter' , suppressMenu : true , floatingFilterComponent : 'customNumberFloatingFilter' , floatingFilterComponentParams : { suppressFilterButton : true , color : 'red' , } , } , { field : 'silver' , filter : 'agNumberColumnFilter' , suppressMenu : true , floatingFilterComponent : 'customNumberFloatingFilter' , floatingFilterComponentParams : { suppressFilterButton : true , color : 'blue' , } , } , { field : 'bronze' , filter : 'agNumberColumnFilter' , suppressMenu : true , floatingFilterComponent : 'customNumberFloatingFilter' , floatingFilterComponentParams : { suppressFilterButton : true , color : 'green' , } , } , { field : 'total' , filter : 'agNumberColumnFilter' , suppressMenu : true , floatingFilterComponent : 'customNumberFloatingFilter' , floatingFilterComponentParams : { suppressFilterButton : true , color : 'orange' , } , } , ] ; const gridOptions = { defaultColDef : { editable : true , sortable : true , flex : 1 , minWidth : 100 , filter : true , floatingFilter : true , resizable : true , } , components : { customNumberFloatingFilter : NumberFloatingFilterComponent , } , columnDefs : columnDefs , rowData : null , } ; document . addEventListener ( 'DOMContentLoaded' , ( ) => { const gridDiv = document . querySelector ( '#myGrid' ) ; new agGrid . Grid ( gridDiv , gridOptions ) ; fetch ( 'https://www.ag-grid.com/example-assets/olympic-winners.json' ) . then ( response => response . json ( ) ) . then ( data => { gridOptions . api ! . setRowData ( data ) ; } ) ; } ) ;