Premium support for our pure JavaScript UI components


Post by sprabhu »

Hi,
I am trying to implement 2 buttons which when will mimic the functionality of hide filter bar. One button will display the filter bar and 2nd button will hide it.

Also can we hide the filter bar on initial load and when we click the 1st button the filter bar will be visible?
And can we customize the row height of the filter bar?

Thanks

Attachments
Menu item filter
Menu item filter
Menu item.png (19.05 KiB) Viewed 146 times

Post by tasnim »

Hi,

I am trying to implement 2 buttons which when will mimic the functionality of hide filter bar. One button will display the filter bar and 2nd button will hide it.

Yes sure. You could hide and show the filter bar using these methods
https://bryntum.com/products/gantt/docs/api/Grid/feature/FilterBar#function-showFilterBar
https://bryntum.com/products/gantt/docs/api/Grid/feature/FilterBar#function-hideFilterBar

Also can we hide the filter bar on initial load and when we click the 1st button the filter bar will be visible?

Sure. You could hide the filterbar initially by setting hidden to true

    columns : [
        {
            type       : 'name',
            width      : 250,
            filterable : {
                filterField : {
                    type   : 'textfield',
                    hidden : true
                }
            }
        }
    ],

https://bryntum.com/products/gantt/docs/api/Grid/feature/FilterBar#enabling-filtering-for-a-column

And can we customize the row height of the filter bar?

You could set height field to a number to customize the height
https://bryntum.com/products/gantt/docs/api/Core/widget/TextField#config-height

    columns : [
        {
            type       : 'name',
            width      : 250,
            filterable : {
                filterField : {
                    type   : 'textfield',
                    height : 100,
                    hidden : true
                }
            }
        }
    ]

All The Best,
Tasnim


Post by sprabhu »

This is working now, Thanks a lot for your help


Post Reply