Skip to content
Advertisement

How to make the search icon permanently visible in the column in ag-grid?

I want to make the filter icon visible permanently in the Ag-grid. The current behaviour is such that the filter icons in the columns only become visible when I hover across the column headings .

This is an example of the column definition that I am using.

this.ColumnDefs=[{"headerName":"Interface","field":"interfaceName",sortingOrder: ['asc','desc', 'null'],width:120,cellStyle:{'text-align': "left"},unSortIcon: true},
{"headerName":"Status","field":"status",sortingOrder: ['asc','desc', 'null'],width:120,cellStyle:{'text-align': "left"},unSortIcon: true},
{"headerName":"Runtime","field":"lastDate",sortingOrder: ['asc','desc', 'null'],width:150,cellStyle:{'text-align': "left"},unSortIcon: true}]

How can I achieve this result?

Advertisement

Answer

The correct answer is here to set suppressMenuHide in gridOptions or directly on HTML [suppressMenuHide]="true"

suppressMenuHide Set to true to always show the column menu button, rather than only showing when the mouse is over the column header.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement