[data grid] Customize GridColumnsPanel search function #6453
Labels
component: data grid
This is the name of the generic UI component, not the React module!
customization: extend
Logic customizability
enhancement
This is not a bug, nor a new feature
plan: Pro
Impact at least one Pro user
Duplicates
Latest version
Summary 💡
Hello, in the existing code
mui-x/packages/grid/x-data-grid/src/components/panel/GridColumnsPanel.tsx
Line 141 in 58fc98f
it appears to look for a
headerName
or thefield
to filter the search results for the columns in theGridColumnsPanel
. It would be nice if this could also look at the description. We have a column called MPH, but we would like to be able to search for "Mile" and find this column in the list, based on the description being "Miles per hour". This is a change that would affect everyone, and not everyone may like this, so, it might be nice if there was a way to indicate what fields it should search across or to customize this search function instead.I found this previous PR, which changed the logic to what it has today:
#3959
Examples 🌈
No response
Motivation 🔦
Our column headers typically will have an abbreviation in it, and the description column will have the fully spelled out names available when hovering over these column headers. For example, we have a column that we have titled "MPH" as the headerName, and the description is "Miles per hour". When searching for a field in the columns panel, we'd like to show this column when searching for "mile" and not just "MPH".
Searching for "mph" returns the column:
Searching for "mile", however, does not return this column.
Order ID 💳 (optional)
42641
The text was updated successfully, but these errors were encountered: