blob: 586a6a22ff63561280b836dd6770829578bb9edc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import ReactSelect from "react-select";
const Select = ({
field,
...props
}) => (
<>
<ReactSelect
classNamePrefix="form-select"
ref={field.ref}
onChange={(option) => field.onChange(option.value)}
value={field.value ? props.options.find(option => option.value === field.value) : ''}
isDisabled={props.disabled}
{...props}
/>
</>
);
export {
Select
};
|