New source found from dndbeyond.com
This commit is contained in:
+5
-2
@@ -64,7 +64,7 @@ export const Select: FC<SelectProps> = ({
|
||||
}
|
||||
// If value is string, show string
|
||||
else if (!multiple && value) {
|
||||
return value;
|
||||
return options.find((option) => option.value === value)?.label || value;
|
||||
}
|
||||
// If there is no value, show the placeholder
|
||||
else {
|
||||
@@ -114,7 +114,10 @@ export const Select: FC<SelectProps> = ({
|
||||
type="radio"
|
||||
name={name}
|
||||
value={option.value}
|
||||
onChange={(e) => onChange?.(e)}
|
||||
onChange={(e) => {
|
||||
onChange?.(e);
|
||||
setIsVisible(false);
|
||||
}}
|
||||
checked={value === option.value}
|
||||
/>
|
||||
{option.label}
|
||||
|
||||
Reference in New Issue
Block a user