import { GridOptions } from '@ag-grid-community/core' ; const gridOptions = { columnDefs : [ { field : 'athlete' , filter : 'agMultiColumnFilter' , filterParams : { filters : [ { filter : 'agTextColumnFilter' , display : 'subMenu' , } , { filter : 'agSetColumnFilter' , } , ] , } , } , { field : 'country' , filter : 'agMultiColumnFilter' , filterParams : { filters : [ { filter : 'agTextColumnFilter' , display : 'accordion' , title : 'Expand Me for Text Filters' , } , { filter : 'agSetColumnFilter' , display : 'accordion' , } , ] , } , } , { field : 'sport' , filter : 'agMultiColumnFilter' , } , ] , defaultColDef : { flex : 1 , minWidth : 200 , resizable : true , menuTabs : [ 'filterMenuTab' ] , } , sideBar : { toolPanels : [ { id : 'filters' , labelDefault : 'Filters' , labelKey : 'filters' , iconKey : 'filter' , toolPanel : 'agFiltersToolPanel' , } , ] , } , } ; document . addEventListener ( 'DOMContentLoaded' , function ( ) { var 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 ) ) ; } ) ;