mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
specify PropTypes format of formik-select options
This commit is contained in:
parent
3d0da891a9
commit
658cb1d61e
1 changed files with 7 additions and 7 deletions
|
@ -24,7 +24,7 @@ const FormikSelect = ({
|
|||
</option>
|
||||
));
|
||||
return (
|
||||
<div className="col-sm-9 row row-relative">
|
||||
<div className="col-sm-9 row">
|
||||
<Field
|
||||
className={classNames(
|
||||
'select',
|
||||
|
@ -49,13 +49,13 @@ const FormikSelect = ({
|
|||
FormikSelect.propTypes = {
|
||||
className: PropTypes.string,
|
||||
error: PropTypes.string,
|
||||
// expect structure like: [
|
||||
// {value: 'US', label: 'United States'}
|
||||
// {value: 'AG', label: 'Angola'}
|
||||
// ...
|
||||
// ]
|
||||
options: PropTypes.arrayOf(PropTypes.any),
|
||||
options: PropTypes.arrayOf(PropTypes.shape({
|
||||
disabled: PropTypes.bool,
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired
|
||||
})).isRequired,
|
||||
validationClassName: PropTypes.string,
|
||||
// selected value
|
||||
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue