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

Encountered two children with the same key #43795

Open
Nefcanto opened this issue Sep 17, 2024 · 1 comment
Open

Encountered two children with the same key #43795

Nefcanto opened this issue Sep 17, 2024 · 1 comment
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@Nefcanto
Copy link

Nefcanto commented Sep 17, 2024

Steps to reproduce

Create an MUI app and use autocomplete. You should see:

Warning: Encountered two children with the same key, ``. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
ul
withEmotionCache2/<@https://client.menutime.local/node_modules/.vite/deps/chunk-EAUZXVZV.js?v=783f97bd:692:45
div
withEmotionCache2/<@https://client.menutime.local/node_modules/.vite/deps/chunk-EAUZXVZV.js?v=783f97bd:692:45
Paper2@https://client.menutime.local/node_modules/.vite/deps/chunk-SNTBBM6X.js?v=783f97bd:101:32
withEmotionCache2/<@https://client.menutime.local/node_modules/.vite/deps/chunk-EAUZXVZV.js?v=783f97bd:692:45
div
PopperTooltip2@https://client.menutime.local/node_modules/.vite/deps/chunk-7LK47B33.js?v=783f97bd:1572:7
Portal2@https://client.menutime.local/node_modules/.vite/deps/chunk-NGWQQGGN.js?v=783f97bd:38:7
Popper2@https://client.menutime.local/node_modules/.vite/deps/chunk-7LK47B33.js?v=783f97bd:1689:7
withEmotionCache2/<@https://client.menutime.local/node_modules/.vite/deps/chunk-EAUZXVZV.js?v=783f97bd:692:45
Popper4@https://client.menutime.local/node_modules/.vite/deps/chunk-7LK47B33.js?v=783f97bd:1874:17
withEmotionCache2/<@https://client.menutime.local/node_modules/.vite/deps/chunk-EAUZXVZV.js?v=783f97bd:692:45
Autocomplete2@https://client.menutime.local/node_modules/.vite/deps/@mui_material_Autocomplete.js?v=d4467d5a:1549:32
div
withEmotionCache2/<@https://client.menutime.local/node_modules/.vite/deps/chunk-EAUZXVZV.js?v=783f97bd:692:45
FormControl2@https://client.menutime.local/node_modules/.vite/deps/chunk-IWZZKCP6.js?v=783f97bd:114:32

Current behavior

No response

Expected behavior

No response

Context

No response

Your environment

No response

Search keywords: same key

@Nefcanto Nefcanto added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 17, 2024
@AsimSafarli
Copy link

<Autocomplete
options={data}
getOptionLabel={(item) => item.title}
renderInput={(params) => <TextField {...params} label="Choose an option" />}
key={(item) => item.id} {'mock data use uuid '}
/>

@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants