Skip to content

Commit

Permalink
supply keys for each option
Browse files Browse the repository at this point in the history
  • Loading branch information
noahm committed Apr 8, 2024
1 parent 1b8a70b commit bc63d75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/common/typed-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ export function TypedSelect<Opts extends string>(props: Props<Opts>) {

return (
<select {...selectProps} onChange={(e) => onOptSelected?.(e.currentTarget.value as Opts)}>
{options.map(([key, label]) => (
<option value={key}>{label}</option>
{options.map(([value, label]) => (
<option value={value} key={value}>
{label}
</option>
))}
</select>
);
Expand Down

0 comments on commit bc63d75

Please sign in to comment.