mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 11:34:21 +00:00
🐛 Fix #17 for Select
s
This commit is contained in:
parent
ffba0c9bd0
commit
e677bb5785
1 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ export function FormSelect<T>({label, validity, options, pairProps, labelProps,
|
||||||
)
|
)
|
||||||
|
|
||||||
const optionComponents = React.useMemo(
|
const optionComponents = React.useMemo(
|
||||||
() => Object.entries(options).map(([optKey, optValue]) => <Select.Option value={optKey} key={optKey} selected={value === optValue}/>),
|
() => Object.entries(options).map(([optKey, optValue]) => <Select.Option value={optKey} key={optKey}/>),
|
||||||
[options],
|
[options],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ export function FormSelect<T>({label, validity, options, pairProps, labelProps,
|
||||||
<FormPair
|
<FormPair
|
||||||
label={<FormLabel {...labelProps}>{label}</FormLabel>}
|
label={<FormLabel {...labelProps}>{label}</FormLabel>}
|
||||||
input={
|
input={
|
||||||
<Select onSimpleChange={onSimpleChangeWrapped} {...props}>
|
<Select onSimpleChange={onSimpleChangeWrapped} value={value} {...props}>
|
||||||
{optionComponents}
|
{optionComponents}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue