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

[data grid] Filtering on column header #6247

Closed
joserodolfofreitas opened this issue Sep 21, 2022 · 7 comments · Fixed by #7760
Closed

[data grid] Filtering on column header #6247

joserodolfofreitas opened this issue Sep 21, 2022 · 7 comments · Fixed by #7760
Assignees
Labels
component: data grid This is the name of the generic UI component, not the React module! design This is about UI or UX design, please involve a designer feature: Filtering Related to the data grid Filtering feature new feature New feature or request plan: Pro Impact at least one Pro user v6.x

Comments

@joserodolfofreitas
Copy link
Member

joserodolfofreitas commented Sep 21, 2022

Summary

Enable the possibility of using a filter input on the column's header, either by:

  • Adding a second header row to host an (open) filter for columns.
  • Replacing the title with an input.

Figma prototype

vDecember-05-2022

Motivation

There are different issues asking for this feature, each requiring something a bit different, which shows the need to leave customization open for this field.

The basic solution, and most likely the default, involves adding an input (Usually text, but it could be a select, or other inputs that matches column types) on the second header row assuming a “contains” or “equals” cooperation.

Customizations:

  • Complex filters
  • Custom inputs
  • Custom style

Examples

Devexpress
image

Telerik, and AG Grid use the filter icon to bring advanced options, each in its own way.

image

Screen Shot 2022-10-07 at 11 38 32

Screen Shot 2022-10-07 at 11 56 01

guriddojs
http://www.guriddo.net/demo/guriddojs/searching/custom_rule/index.html
image

@joserodolfofreitas joserodolfofreitas added component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request v6.x feature: Filtering Related to the data grid Filtering feature design: ux labels Sep 21, 2022
@flaviendelangle flaviendelangle changed the title [DataGrid] Filtering on column header [data grid] Filtering on column header Sep 22, 2022
@joserodolfofreitas joserodolfofreitas added the plan: Pro Impact at least one Pro user label Oct 7, 2022
@gerdadesign
Copy link
Member

Curious about how this would work with multiple filters and adjusting is / is not / > / < etc. Most use cases linked seem to be for simple "contains" filtering.
DataGridPro - second header row (1)

I'm also wondering if it's something we can add to the header without a second row? If we start from our current hover state on the header and allow the filter icon in the hover state to move to the left and you now edit the filters.
(this interaction is organized from the bottom up, starting at the header row of the grid)
Screen Shot 2022-10-12 at 1 47 36 PM

@joserodolfofreitas
Copy link
Member Author

Since we're moving forward without a Query language on a filter input, we need to find an alternative way to support some advanced use cases, at least those that depend on a different comparator (not contains or equals).

@gerdadesign, can we have a concept with a UI control to change the comparator?

Another point: The filtering on header won't support multiple conditions, but it must still somehow reflect if a user set multiple conditions in the filter panel.

@mauro-ni
Copy link

mauro-ni commented Nov 9, 2022

Would the header with the filters and the panel with the filters be available at the same time or is it up to the developer to choose between one of the two possibilities?

In case both can be activated then one possibility would be to limit to logic AND and one filter per column in the filter panel.

Mauro

@joserodolfofreitas
Copy link
Member Author

Thanks for the feedback, @mauro-ni.
We may add an opt-out option for disabling the Filter Panel, but the idea of having both filtering UIs enabled is meant as a way to provide/complement advanced filtering options, which may not be possible with the simplified UI on the header.

@mauro-ni
Copy link

@joserodolfofreitas Thanks for the reply. I understand that it may not be possible to provide both a simplified user interface in the header and filter panel. An idea could be to show only one filter per column in the simplified user interface in the header and possibly signal with an icon (or a icon button) the presence of other filters, accessible through the filter panel.
What do you think?

@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 7, 2022

Reading through this issue. I feel that it's going after the same problem than #5973. I first saw this request when Damien implemented the rich filtering feature, and people asked the same thing:

Coming from jQuery I noticed how much the end user likes the direct filtering from header columns (no modals to open, less clicks)

Effectivement, it's about allowing designers and PMs to implement different filtering UX tradeoffs. So I think it's all about optimizing for the simpler search use cases (AND contain match for each column), compared the filter panel.

People seem like this tradeoff:

@oliviertassinari oliviertassinari added design This is about UI or UX design, please involve a designer and removed design: ux labels Aug 18, 2023
@oliviertassinari
Copy link
Member

If we ever want to push column header filtering far:

Screen.Recording.2023-09-14.at.17.42.04.mov

https://observablehq.com/@fil/insee-parquet

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! design This is about UI or UX design, please involve a designer feature: Filtering Related to the data grid Filtering feature new feature New feature or request plan: Pro Impact at least one Pro user v6.x
Projects
Status: Recently completed
Development

Successfully merging a pull request may close this issue.

5 participants