mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -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,
|
||||
name,
|
||||
onSetCustom,
|
||||
onSetCustomRef,
|
||||
value,
|
||||
...props
|
||||
}) => (
|
||||
|
@ -89,6 +90,7 @@ const FormikRadioButton = ({
|
|||
<FormikInput
|
||||
className="formik-radio-input"
|
||||
name="custom"
|
||||
setRef={onSetCustomRef}
|
||||
wrapperClassName="formik-radio-input-wrapper"
|
||||
/* eslint-disable react/jsx-no-bind */
|
||||
onChange={event => onSetCustom(event.target.value)}
|
||||
|
@ -106,6 +108,7 @@ FormikRadioButton.propTypes = {
|
|||
label: PropTypes.string,
|
||||
name: PropTypes.string,
|
||||
onSetCustom: PropTypes.func,
|
||||
onSetCustomRef: PropTypes.func,
|
||||
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue