mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
formik-radio-button can pass custom input ref up
This commit is contained in:
parent
b438eed70d
commit
5ec8811427
1 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,7 @@ const FormikRadioButton = ({
|
||||||
label,
|
label,
|
||||||
name,
|
name,
|
||||||
onSetCustom,
|
onSetCustom,
|
||||||
|
onSetCustomRef,
|
||||||
value,
|
value,
|
||||||
...props
|
...props
|
||||||
}) => (
|
}) => (
|
||||||
|
@ -89,6 +90,7 @@ const FormikRadioButton = ({
|
||||||
<FormikInput
|
<FormikInput
|
||||||
className="formik-radio-input"
|
className="formik-radio-input"
|
||||||
name="custom"
|
name="custom"
|
||||||
|
setRef={onSetCustomRef}
|
||||||
wrapperClassName="formik-radio-input-wrapper"
|
wrapperClassName="formik-radio-input-wrapper"
|
||||||
/* eslint-disable react/jsx-no-bind */
|
/* eslint-disable react/jsx-no-bind */
|
||||||
onChange={event => onSetCustom(event.target.value)}
|
onChange={event => onSetCustom(event.target.value)}
|
||||||
|
@ -106,6 +108,7 @@ FormikRadioButton.propTypes = {
|
||||||
label: PropTypes.string,
|
label: PropTypes.string,
|
||||||
name: PropTypes.string,
|
name: PropTypes.string,
|
||||||
onSetCustom: PropTypes.func,
|
onSetCustom: PropTypes.func,
|
||||||
|
onSetCustomRef: PropTypes.func,
|
||||||
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue