问题
Is it possible to open and close or to show and hide custom floating filters in ag-grid, for example if a button was clicked?
If you initialize the table, only the header should be visible. Then after a specific button was clicked, also the floating filters below the header should be visible.
回答1:
Try this:
gridOptions.floatingFilter = !gridOptions.floatingFilter;
gridOptions.api.refreshHeader();
来源:https://stackoverflow.com/questions/46956579/is-it-possible-to-open-and-close-a-custom-floating-filter-in-ag-grid