mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
use onSetRef instead of setRef in formik-input
This commit is contained in:
parent
358f30c656
commit
daeed19dc5
2 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ require('./formik-input.scss');
|
|||
const FormikInput = ({
|
||||
className,
|
||||
error,
|
||||
setRef,
|
||||
onSetRef,
|
||||
toolTip,
|
||||
validationClassName,
|
||||
wrapperClassName,
|
||||
|
@ -32,7 +32,7 @@ const FormikInput = ({
|
|||
className
|
||||
)}
|
||||
/* formik uses "innerRef" to return the actual input element */
|
||||
innerRef={setRef}
|
||||
innerRef={onSetRef}
|
||||
{...props}
|
||||
/>
|
||||
{error ? (
|
||||
|
@ -54,7 +54,7 @@ const FormikInput = ({
|
|||
FormikInput.propTypes = {
|
||||
className: PropTypes.string,
|
||||
error: PropTypes.string,
|
||||
setRef: PropTypes.func,
|
||||
onSetRef: PropTypes.func,
|
||||
toolTip: PropTypes.string,
|
||||
type: PropTypes.string,
|
||||
validationClassName: PropTypes.string,
|
||||
|
|
|
@ -91,12 +91,12 @@ 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)}
|
||||
onFocus={event => onSetCustom(event.target.value)}
|
||||
/* eslint-enable react/jsx-no-bind */
|
||||
onSetRef={onSetCustomRef}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
|
|
Loading…
Reference in a new issue