mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +00:00
Use defaultValue instead of selected (#187)
This commit is contained in:
parent
d987ac816a
commit
0595e54a9b
@ -16,9 +16,10 @@ const ComboBoxInput = ({ id, options, value, onValueChange }: ComboBoxProps) =>
|
||||
id={id}
|
||||
className='tw-form-select tw-block tw-w-full tw-py-2 tw-px-4 tw-border tw-border-gray-300 rounded-md tw-shadow-sm tw-text-sm focus:tw-outline-none focus:tw-ring-indigo-500 focus:tw-border-indigo-500 sm:tw-text-sm'
|
||||
onChange={handleChange}
|
||||
defaultValue={value}
|
||||
>
|
||||
{options.map((o) => (
|
||||
<option value={o} key={o} selected={o === value}>
|
||||
<option value={o} key={o}>
|
||||
{o}
|
||||
</option>
|
||||
))}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user