dash-ag-grid
dash-ag-grid copied to clipboard
Grid option `suppressSetFilterByDefault` not working
In the AG Grid docs, it's highlighted that changing to the enterprise version, the default column filter is the "set filter" (see https://www.ag-grid.com/javascript-data-grid/filter-set/). On the same page, they note:
Suppress Set Filter by Default
When filter = true, the Set Filter is used for AG Grid Enterprise by default. To use the Text Filter, Number Filter or Date Filter instead based on the Cell Data Type (as in AG Grid Community), set the grid option suppressSetFilterByDefault = true.
I tried
AgGrid(
...,
dashGridOptions={"suppressSetFilterByDefault": True},
enableEnterpriseModules=True,
)
in dash_ag_grid (version 31.3.0), but the columns are still rendered with set filter.
Any hints on how to properly pass this option to Ag Grid?
It seems that even in their examples it doesnt work the way they say it works...
If you suppress and you only have True as the filter (in JS it doesnt do anything...)
I recommend declaring your filters, eg: agTextColumnFilter when needed...
looks like the suppressSetFilterByDefault prop isn't in 31.3
https://www.ag-grid.com/archive/31.3.0/react-data-grid/grid-options/#reference-filter
If you need to refer to the upstream ag-grid docs, be sure to use the archived version that matches the version dash-ag-grid uses (31.3)
https://www.ag-grid.com/archive/31.3.0/react-data-grid
@AnnMarieW Ok, makes sense, thank you for the quick reply! Is it okay if I leave this issue open until it's closed with the next ag-grid update in dash-ag-grid that will make this available?
@BSd3v I understand where you're coming from but this effectively means going through all of our codebase and declaring filters for every column manually just because we made the switch to enterprise. It's just a hurdle that comes with a large amount of unexpected work from a license switch which was supposed to make things easier. But I know the issue here lies with ag-grid.js not offering this option in the first place and not with dash_ag_grid
If you are using grid's with similar options throughout your application, I'd highly recommend making a function or AIO to make sweeping changes much easier to implement vs having to go line by line for it.
Even the same thing for columnDefs, if you manage your columnDefs (mapping included) in a single location and use your function to marry the definitions you can streamline adjustments and also make sure that your standards are always applied. 🙂
Anyways, we will be rolling out 31.3 which supports Dash 3, then releasing 32 and 33 shortly after (hopefully).
Hello @benmaier,
v32 and v33 are both available, so we should be able to close this. 😄