[data grid] Implement multi-column filter
Plan of action
- [x] 1. Build a column header menu, it will be used for filtering, sorting and any other feature that a column can leverage.
- [x] 2. Build the internal state filtering logic to support one type: string and one operator: contain.
- [x] 3. Create a global filter UI popup, same as Airtable, Notion, Retool.
- [x] 4. Expose a programmatic public filtering API (3. was for end-users, 4. is for developers).
- [x] 5. Support all the operations and types possible: date, date range, exclude, etc.
- [x] 6. Add a toolbar component #516 (filter popup open, display density, etc.)
- [ ] 7. Implement quick filter #202
- [ ] 8. Consider supporting inline filter (e.g. react-table demo) but we might not do it.
Benchmark
- https://react-table.tanstack.com/docs/examples/filtering
- https://ant.design/components/table/#components-table-demo-head
- https://material-table.com/#/docs/features/filtering
- https://ag-grid.com/javascript-grid-filtering/
- https://demos.telerik.com/kendo-ui/grid/filter-row
- https://www.telerik.com/kendo-react-ui/components/grid/filtering/
- https://ej2.syncfusion.com/react/demos/#/material/grid/filter-menu
- https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/Filtering/React/Light/
- https://www.jqwidgets.com/react/react-grid/#https://www.jqwidgets.com/react/react-grid/react-grid-filtering.htm
- http://tabulator.info/docs/4.5/filter
- https://www.bryntum.com/examples/grid/filterbar/
- https://handsontable.com/examples?manual-resize&manual-move&conditional-formatting&context-menu&dropdown-menu&headers&filters
- https://www.infragistics.com/products/ignite-ui-angular/angular/components/treegrid/tree_grid.html
- https://baseweb.design/components/unstable-data-table/#batch-actions
- https://try.firetable.io/table/mvpResources
Screenshots
- https://react-table.tanstack.com/docs/examples/filtering
- https://ant.design/components/table/#components-table-demo-head
- https://material-table.com/#/docs/features/filtering
- https://ag-grid.com/javascript-grid-filtering/
- https://demos.telerik.com/kendo-ui/grid/filter-row
- https://www.telerik.com/kendo-react-ui/components/grid/filtering/
- https://ej2.syncfusion.com/react/demos/#/material/grid/filter-menu
- https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/Filtering/React/Light/
- https://www.jqwidgets.com/react/react-grid/#https://www.jqwidgets.com/react/react-grid/react-grid-filtering.htm
- http://tabulator.info/docs/4.5/filter
- https://www.bryntum.com/examples/grid/filterbar/
- https://handsontable.com/examples?manual-resize&manual-move&conditional-formatting&context-menu&dropdown-menu&headers&filters
- https://www.infragistics.com/products/ignite-ui-angular/angular/components/treegrid/tree_grid.html
- https://baseweb.design/components/unstable-data-table/#batch-actions
- https://try.firetable.io/table/mvpResources
I am waiting to see the column level filter in Data grid
👍
This issue includes 3 aspects:
- the built-in capability to handle filtering in the component.
- quick column filter (a simple filter field embedded in the column header).
- column filter.
For 3., I would vote for going with Airtable's approach. From my perspective, it's the best one seen so far.
The filtering UX of https://airtable.com/
The filtering UX of https://stripe.com/

+1 for AirTable UX
Notion has almost the same UX as Airtable, it works great

I would love to see the filter on this table, anyone know if this is in progress ?
Yes we are working on it :)
Awesome !! Thank you for that :)
Hi team, appreciate your efforts bringing filtering to this amazing Datagrid, any plans when to release? Critical for us to use / not to use in a coming project.
when to release
@HichemDax End of the month if everything goes well, before the end of the year is likely.
Thats a good news, thanks @oliviertassinari
🔥
This is our latest progress on the feature: https://codesandbox.io/s/material-demo-forked-8tryv?file=/index.js. Any early feedback would be appreciated. You can find the underlying pull request at #411 :D
Really looking forward to this. 🚀 . The current demo looks awesome.
Are there any plans to add support for server-side filtering or in other words to expose the selected column filters in a public developer API? I am not sure if that is what you guys mentioned in the issue description with
- Expose a programmatic public filtering API (3. was for end-users, 4. is for developers)
@angelsvirkov I hear two different use cases in your message:
- The capability to filter from the server. There are two precedent with the server-side pagination and server-side sorting features.
- The capability to listen to the filters applied or even control them from the outside. For instance, it could be used to implement 1. but with some limitations. We plan to allow this. @dtassone has started to work on it in #533, but nothing that can be used yet. Developers using Material-UI should consider that a feature not documented is private and could be removed at any time. In this direction, we will have a
onStateChangeAPI.
Great progress. Here are some comments based on my first impression though (we all know that the first impression counts when it is about ergonomic):
The filter should be much more straight forward. I don't mean showing a horrible textbox/drop down on top of every filterable column. The popup is indeed a good ergonomic compromise to get a grid that is visually as light as possible. According to me, the problem lie in the fact this complex filtering system that is shown by default is not user friendly regarding to the 95% of usage: quickly typing a keyword for the dedicated column to get a result asap. This advanced "intimidating" and click consuming filtering/sorting system should be accessed from somewhere else with a global dedicated button on top of the grid. When filtered, a column should have an extra icon (or simply by changing the existing vertical triple points icon into another one) shown to know in an eyesight that this column is filtered.
To summarize...
The software who made everybody agree with its ergonomics is Excel. What is needed 95% of times is both very simple and very fast to get. Like this:
then click on the of the column you wanna filter:

And yet... advanced features are offered, but it's a "gridwide" feature accessible with a different button (a global button some where that shows a different screen such as the one you show for now). My belief is that you shall focus on what represents 95% (not to say 99%) of usage to start. And then, later on, as an extra feature (why not for the commercial version) implement the advanced feature shown on a different screen.
If you would like to have a powerful Filter feature stick to what @paillave said. I was about to write in the same idea.
FWIW I think the global sorting/filtering UI from Airtable/Notion is definitely the right way to go. Super glad to see you are working on it and cannot wait to integrate it in our current product. :)
@timonbimon this feature is indeed necessary for the grid to be complete. But still, it is according to me unacceptable to show such a complex screen to make a quick filter. I don't see myself selling such a "quick filtering" feature to my clients who are so used to the quick and straightforward excel filtering system. Once again, make common use cases very simple, and leave advanced ones complex. Making a complex screen to ensure that is covers as well what is needed only 5% of time is a big mistake. End users choose a product based on its productivity. It is ludicrous that users spend 95% of their time doing like they need a advanced filter. And still once again, users (and myself) believe that Excel just made it perfect! I would be a pity to change something that already has the approval of (nearly) the entire planet whereas it took 30 years to Excel to reach this level of ergonomic.