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] Autocomplete in filtering (is any of) #11750

Open
Tracked by #9328
oleksandrfomin5995 opened this issue Jan 19, 2024 · 4 comments
Open
Tracked by #9328

[data grid] Autocomplete in filtering (is any of) #11750

oleksandrfomin5995 opened this issue Jan 19, 2024 · 4 comments
Labels
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 recipe support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ waiting for 👍 Waiting for upvotes

Comments

@oleksandrfomin5995
Copy link

oleksandrfomin5995 commented Jan 19, 2024

The problem in depth

Datagrid "is any of" filter type does not autocomplete the column values

My columns definition looks as follows:

 const columns = [
    {
      field: 'name',
      headerName: 'Name',
      valueOptions: entities.map(({ id, name }) => ({ id, name })),
      flex: 1,
    },
...
  ];

Not sure if valueOptions does anything for string type column but the autocomplete does not work in either case.
Am I doing something wrong?

Your environment

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: datagrid is any of filter autocomplete
Order ID: 67193

@oleksandrfomin5995 oleksandrfomin5995 added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Jan 19, 2024
@zannager zannager added component: data grid This is the name of the generic UI component, not the React module! support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ labels Jan 19, 2024
@michelengelen
Copy link
Member

@oleksandrfomin5995 what exactly are you trying to achieve? A live example would help a lot to solve your issue.

Is the filtering in this example what you are trying to accomplish? (Filter by country and set is any of) ... notice that there is no real autocomplete in place as well, only a option filtering.

@michelengelen michelengelen added status: waiting for author Issue with insufficient information feature: Filtering Related to the data grid Filtering feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 22, 2024
@michelengelen michelengelen changed the title [question] [data grid] Autocomplete in filtering (is any of) Jan 22, 2024
@oleksandrfomin5995
Copy link
Author

oleksandrfomin5995 commented Jan 22, 2024

@oleksandrfomin5995 what exactly are you trying to achieve? A live example would help a lot to solve your issue.

Is the filtering in this example what you are trying to accomplish? (Filter by country and set is any of) ... notice that there is no real autocomplete in place as well, only a option filtering.

Since the "is any of" filter requires the entered value to exactly match the searched column value I was under the impression that it should work as an Autocomplete. This means that as you start typing you expect to have a list of suggestions chosen from all available values within the column.

Currently, it only allows you to "choose" what you've already typed in.

As shown the screenshot below I would expect to have Devin Miller suggested in the dropdown
Знімок екрана 2024-01-22 120000

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Jan 22, 2024
@michelengelen
Copy link
Member

OK, now i get what you want.
AFAIK we currently do not support this out of the box.
There might be a chance if you use custom filter input components though.
@romgrk do you maybe have more info on this or even an idea on how this could be done?
Thanks! 🙇🏼

@cherniavskii cherniavskii added the waiting for 👍 Waiting for upvotes label Jan 22, 2024
@joserodolfofreitas joserodolfofreitas added the docs Improvements or additions to the documentation label Jan 22, 2024
@joserodolfofreitas joserodolfofreitas removed the docs Improvements or additions to the documentation label Jan 22, 2024
@michelengelen
Copy link
Member

created #11786 to handle the wrong input variant

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 22, 2024
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! feature: Filtering Related to the data grid Filtering feature recipe support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

5 participants