mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.07k stars 1.26k forks source link

How can I have a select element with search when inline edit? #11378

Closed MPavaoDS closed 9 months ago

MPavaoDS commented 9 months ago

The problem in depth 🔍

I would like to implement a feature similar to the "Country" search in the following demo: https://mui.com/x/react-data-grid/filtering/ where there is a dropdown of values and the user can type to search a value. I have spent a considerable amount of time trying to do this, I tried several different things but I just cannot reach a solution. Would it be possible to have access to the dataset you use in this demo so I can look at the column definition?

Your environment 🌎

`npx @mui/envinfo` ``` System: OS: Windows 10 10.0.19045 Binaries: Node: 18.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: Not Found Edge: Spartan (44.19041.3636.0), Chromium (120.0.2210.61) npmPackages: @emotion/react: ^11.10.5 => 11.10.5 @emotion/styled: ^11.10.5 => 11.10.5 @mui/base: 5.0.0-alpha.115 @mui/core-downloads-tracker: 5.11.6 @mui/icons-material: ^5.10.16 => 5.11.0 @mui/material: ^5.10.16 => 5.11.6 @mui/private-theming: 5.11.2 @mui/styled-engine: 5.11.0 @mui/styles: ^5.10.16 => 5.11.2 @mui/system: 5.11.5 @mui/types: 7.2.3 @mui/utils: 5.11.2 @mui/x-data-grid: 6.15.0 @mui/x-data-grid-generator: 6.18.1 @mui/x-data-grid-premium: ^6.12.1 => 6.15.0 @mui/x-data-grid-pro: 6.15.0 @mui/x-date-pickers: ^6.8.0 => 6.10.1 @mui/x-license-pro: 6.10.2 @types/react: 18.0.27 react: ^18.1.0 => 18.2.0 react-dom: ^18.1.0 => 18.2.0 ```

Search keywords: datagrid, inline row edit, select search Order ID: 74223

michelengelen commented 9 months ago

Hi @MPavaoDS ... you can find that specific definition here: https://github.com/mui/mui-x/blob/5f0343aba083cd1abe642864e1bccf49a613a925/packages/grid/x-data-grid-generator/src/columns/employees.columns.tsx#L112-L125

I will close this now. Feel free to reopen or creating a new issue when you need additional help! Thanks! 🙇🏼