chakra-multiselect
chakra-multiselect copied to clipboard
fix: prevent key from being spread
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} />
Run & review this pull request in StackBlitz Codeflow.