Skip to content

Commit

Permalink
fix: option item key when undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 17, 2021
1 parent 8d57d1a commit 7342386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/editors/src/OptionsEditor/OptionsEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const OptionsEditor: PropertyEditor = ({ name, ...rest }) => {
const v: string = selectValue.length ? selectValue[0].value : '';
return (
<OptionsSelect value={v} onChange={handleChange} {...rest}>
{entries.map(entry => (
<option key={entry.value} value={entry.value}>
{entries.map((entry, idx) => (
<option key={entry.value || `option_key_${idx}`} value={entry.value}>
{entry.label}
</option>
))}
Expand Down

0 comments on commit 7342386

Please sign in to comment.