use onSetRef instead of setRef in formik-input

This commit is contained in:
Ben Wheeler 2019-08-26 16:01:42 -04:00
parent 358f30c656
commit daeed19dc5
2 changed files with 4 additions and 4 deletions

View file

@ -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,

View file

@ -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>