1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-22 11:34:21 +00:00

↩️ Revert commit fixing #17.

This reverts commit e677bb5785.
This commit is contained in:
Steffo 2022-03-12 05:39:10 +01:00
parent e677bb5785
commit 262e2aee19
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -39,7 +39,7 @@ export function FormSelect<T>({label, validity, options, pairProps, labelProps,
)
const optionComponents = React.useMemo(
() => Object.entries(options).map(([optKey, optValue]) => <Select.Option value={optKey} key={optKey}/>),
() => Object.entries(options).map(([optKey, optValue]) => <Select.Option value={optKey} key={optKey} selected={value === optValue}/>),
[options],
)
@ -47,7 +47,7 @@ export function FormSelect<T>({label, validity, options, pairProps, labelProps,
<FormPair
label={<FormLabel {...labelProps}>{label}</FormLabel>}
input={
<Select onSimpleChange={onSimpleChangeWrapped} value={value} {...props}>
<Select onSimpleChange={onSimpleChangeWrapped} {...props}>
{optionComponents}
</Select>
}