fix(web/input): ensure select rerender between dialogs

If opening another input dialog with select in the same row it would cause the value to be the same as the previous one as there was no rerender being forced because their keys were the same
This commit is contained in:
Luke
2022-11-19 12:11:02 +01:00
parent d5e0305df9
commit 7cde7e0581

View File

@@ -21,7 +21,7 @@ const SelectField: React.FC<Props> = (props) => {
return (
<>
<Box mb={3} key={`select-${props.index}`}>
<Box mb={3} key={`select-${props.row.label}-${props.index}`}>
<Select
onChange={(e: React.ChangeEvent<HTMLSelectElement>) => props.handleChange(e.target.value, props.index)}
defaultValue={props.row.default || ''}