<CustomField>). Element reference returns you an
HTMLElementinstance rendered by the component (i.e.
<select>). Both are useful for different scenarios and can be accessed as described below.
<form>element by providing the
innerRefprop to the
Formcomponent and taking its
this.formRef.innerRef. This is the same as providing
innerRefwill always reference the component where
Field.props.fieldPropsget destructed. You must always propagate the essential field props to the actual form element for both proper functioning and referencing.
innerRefexplicitly to return the reference to the
innerRefprop inside your custom field component declaration:
StyledInput.props.innerRefis the prop expected by
Input.props.innerRefis the prop (a function) passed to the custom field component from the
createField()wrapper. Different third-party solutions may expose different interface to accept the inner reference function.