[RFC] Filtering interfaces #3719
Labels
component: data grid
This is the name of the generic UI component, not the React module!
discussion
feature: Filtering
Related to the data grid Filtering feature
RFC
Request For Comments
umbrella
For grouping multiple issues to provide a holistic view
Goal
Depending on why the grid is used, the optimal filtering UI can be very different.
The grid should allow the developer to easily switch between filtering UI the filtering UI customization should be a lot easier and well documented.
Other libraries / software filter UIs
If some users have examples of libraries / software filtering UIs which feel better than our own, we are interested.
Interfaces the user are requesting
Filtering input in the header
Right now, the users try to add inputs in the header.
I think it would be worth building this feature in the grid to add the input in a row below the header (like on Material Table)
A new grid prop
filteringUIMode = "panel" | "header"
A new
GridColDef
propertydefaultOperator
to decide which operator is used in the header (with a default value for each type)A new
renderHeaderFilterCell
to allow heavy customization of this cell ?Filtering input in the column menu (Handsontable-like)
More powerful filter panel (Excel-like)
Quick filter
Customize the current filter panel
Internal behavior
The filtering process can be split into 3 independent parts:
The filtering engine in
useGridFilter
: decide when to filter, what, to filter, updates the state, ...The feature-based filtering logic (eg: the tree data filtering, the row grouping filtering, the flat filtering, ...): decide which rows is matching a
filterModel
The Filtering UI
This RFC only discuss the "Filtering UI", not the other two.
With that being said, the filtering engine must support the
filterModel
format needed for those various filtering UI. For instance, if some UI want s the nested filtering items ((A | B) & C
), then the filtering engine must support it.Therefore, improving the filtering engine will probably be one of the first thing to do before creating a more complex UI.
The text was updated successfully, but these errors were encountered: