chakra-multiselect icon indicating copy to clipboard operation
chakra-multiselect copied to clipboard

fix: prevent key from being spread

Open layaxx opened this issue 8 months ago • 1 comments

This fixes the following Error/Warning that I encountered with [email protected]:

A props object containing a "key" prop is being spread into JSX:
  let props = {key: someKey, value: ..., label: ..., selected: ..., created: ..., index: ..., style: ...};
  <SelectOptionItem {...props} />
React keys must be passed directly to JSX without using spread:
  let props = {value: ..., label: ..., selected: ..., created: ..., index: ..., style: ...};
  <SelectOptionItem key={someKey} {...props} /> 

layaxx avatar Aug 19 '25 15:08 layaxx

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.