Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Filtering interfaces #3719

Open
flaviendelangle opened this issue Jan 24, 2022 · 2 comments
Open

[RFC] Filtering interfaces #3719

flaviendelangle opened this issue Jan 24, 2022 · 2 comments
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

Comments

@flaviendelangle
Copy link
Member

flaviendelangle commented Jan 24, 2022

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)

  1. A new grid prop filteringUIMode = "panel" | "header"

  2. A new GridColDef property defaultOperator to decide which operator is used in the header (with a default value for each type)

  3. 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:

  1. The filtering engine in useGridFilter: decide when to filter, what, to filter, updates the state, ...

  2. The feature-based filtering logic (eg: the tree data filtering, the row grouping filtering, the flat filtering, ...): decide which rows is matching a filterModel

  3. 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.

@flaviendelangle flaviendelangle added discussion umbrella For grouping multiple issues to provide a holistic view labels Jan 24, 2022
@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! feature: Filtering Related to the data grid Filtering feature labels Jan 24, 2022
@nemonemi
Copy link

nemonemi commented Jul 20, 2022

It would be nice to see some progress in this direction.

#4934

@bjornarvh
Copy link

Would love to see a filter row below the header. We use DevExpress XtraGrid for winforms and want to migrate to web. The filter row is very popular with our users, as it has less clicks both to add filters and see current filter.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants