Skip to content

[material-ui][Autocomplete] Grouped options demo has console errors in Next.js #39474

@MSturges

Description

@MSturges

Steps to reproduce 🕹

Link to live example: https://mui.com/material-ui/react-autocomplete/#grouped

using nextjs

It works but I see this in my console

app-index.js:31 Warning: A props object containing a "key" prop is being spread into JSX:
  let props = {key: someKey, tabIndex: ..., role: ..., id: ..., onMouseMove: ..., onClick: ..., onTouchStart: ..., data-option-index: ..., aria-disabled: ..., aria-selected: ..., className: ..., children: ...};
  <li {...props} />
React keys must be passed directly to JSX without using spread:
  let props = {tabIndex: ..., role: ..., id: ..., onMouseMove: ..., onClick: ..., onTouchStart: ..., data-option-index: ..., aria-disabled: ..., aria-selected: ..., className: ..., children: ...};
  <li key={someKey} {...props} />
    at Autocomplete (webpack-internal:///(app-pages-browser)/../../node_modules/@mui/material/Autocomplete/Autocomplete.js:405:83)
    at RenderGroup

Current behavior 😯

No response

Expected behavior 🤔

No response

Context 🔦

No response

Your environment 🌎

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions