This may be a very basic question. I would like the user to be able to toggle visibility of the filter bar on a tree grid by clicking a button. Do I use the toggleFilterBar function for this, and how do I invoke it? I tried looking in treegrid.features.headerMenu, but I'm probably looking in the wrong place.
Support Forum
Hi,
Sure. To do so, you can toggle this prop https://bryntum.com/products/gantt/docs/api/Grid/feature/FilterBar#config-compactMode according to the button status
tbar : [
{
type : 'button',
text : 'Toggle filter bar',
toggleable : true,
onAction({ source }) {
const grid = source.up('grid');
grid.features.filterBar.compactMode = source.pressed;
}
}
]
Here is a gif demo