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] Implement Search (equivalent Ctrl + F) #5082

Open
oliviertassinari opened this issue Jun 1, 2022 · 2 comments
Open

[data grid] Implement Search (equivalent Ctrl + F) #5082

oliviertassinari opened this issue Jun 1, 2022 · 2 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 👍 Waiting for upvotes

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 1, 2022

Summary 💡

Better search UX.

Motivation

Search is not to be confused with Quick filter: https://mui.com/x/react-data-grid/filtering/quick-filter/.
The problem with this feature is that you might want to search in context, seeing the rows next to the match might be important for the end-user use case.

Benchmark 🌈

Screenshot 2022-06-01 at 17 11 28

Screenshot 2022-06-01 at 17 13 52

  • Google spreadsheet

Screenshot 2022-06-01 at 17 16 02

  • Chrome

Screenshot 2022-06-01 at 17 19 01

Context 🔦

Because of virtualization Ctrl+F is not working inside the data grid.

Having whatwg/html#2858 (comment) right in the browser would be amazing.

Thoughts

I would assume that the products that need this feature can already implement the feature on their own, so not something we need to prioritize building anytime soon (we are not blocking them).

One aspect that I'm curious about is how to do the server-side integration? I assume that this feature mostly makes sense when you have > 100 rows, where you are likely to query the server to fetch. The same is true for https://mui.com/x/react-data-grid/filtering/#quick-filter.

@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 👍 Waiting for upvotes labels Jun 1, 2022
@oliviertassinari oliviertassinari changed the title [data grid] Implement Quick filter [data grid] Implement Search Jun 1, 2022
@flaviendelangle
Copy link
Member

I think it's worth to link this issue in the doc

@flaviendelangle
Copy link
Member

flaviendelangle commented Jun 1, 2022

I would assume that the products that need this feature can already implement the feature on their own, so not something we need to prioritize building anytime soon (we are not blocking them).

We could probably help them a lot for client-side search just by exposing some internals of the quick filter
Something like getCellsMatchingFilterQuery: (query: string) => { id: GridRowId, field: string }[]

@flaviendelangle flaviendelangle changed the title [data grid] Implement Search [data grid] Implement Search (equivalent Ctrl + F) Jun 6, 2022
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Jul 24, 2023
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! new feature New feature or request waiting for 👍 Waiting for upvotes
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

2 participants