How to Disable Filter for Column in Magento 2 Grid
Magento 2 grids are the way to manage data by listing the items in a database table.
The default Magento 2 grid allows the admin to sort, filter and edit the data. Moreover, the admin can also use mass action, searching, and pagination to act on bulk data.
While adding a custom column in the grid, it also displays in the filter option. However, not every column needs to be filtered. Implementing implementing multiselect filter for order status in Magento 2 reminds us that keeping only the required columns in the filter area; otherwise, it will become messy if all the columns of your grid are shown in the filter option.
Thus you can disable the filter for column in the Magento 2 grid to remove any column of the grid from filter option.
Here’s the quick solution to do so:
Method to Disable Filter for Column in Magento 2 Grid
You need to remove or comment the below line:
1 |
<item name="filter" xsi:type="string">text</item> |
If you have any doubts regarding this post, just mention them in the Comments section below.
I would be happy to help.
Feel free to share the solution with Magento Community via social media.
Thank You.
Related Posts:
Jignesh Parmar
An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.
Prev
How to Add Stock Status Column in Product Grid in Magento 2
How to Add Custom Message to Admin Sales Order View, Invoice, and Credit Memo in Magento 2
Next