diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-16 12:10:51 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-16 12:10:51 +0700 |
| commit | 059e91523af7d5f17c8357ec27a4512aa90feee3 (patch) | |
| tree | 7350cbcd128dcb439df78652d3e7efb4b71c7313 /src/components/Fields.js | |
| parent | b517722a1d370cbd7457cf98866b806832d61680 (diff) | |
Fix lag if type on mobile
Diffstat (limited to 'src/components/Fields.js')
| -rw-r--r-- | src/components/Fields.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/components/Fields.js b/src/components/Fields.js new file mode 100644 index 00000000..3db8bfdd --- /dev/null +++ b/src/components/Fields.js @@ -0,0 +1,22 @@ +import ReactSelect from "react-select"; + +const Select = ({ + options, + name, + setFieldValue, + value, + disabled +}) => ( + <ReactSelect + classNamePrefix="form-select" + options={options} + name={name} + onChange={(option) => setFieldValue(name, option.value)} + value={value ? options.find(option => option.value === value) : ''} + isDisabled={disabled} + /> +); + +export { + Select +};
\ No newline at end of file |
