Closed RyanWarner closed 5 years ago
Of course, 5 minutes after posting an issue, I fix my issue.
What I was doing:
export default asField(({ options, ...props }) => {
const { label } = options
const { error } = props.fieldState
return <S.InputWrap>
{ label && <S.Label>{label}</S.Label> }
<S.TextInput {...props} {...options} />
<S.Error>{error}</S.Error>
</S.InputWrap>
})
<TextField options={options} />
What fixed it:
<TextField {...options} />
And in the TextInput component <S.TextInput {...props} />
Hello and thank you for the great library.
I'm using
BasicText
with theasField
HOC and I'm getting some warnings in the console about props being set on theinput
DOM element.Could this be solved by pulling these props off, like is being done here https://github.com/joepuzzo/informed/blob/master/src/components/form-fields/Text.js#L10 before passing the rest to the
input
? Or is this a user error on my part?react-dom.development.js:506 Warning: React does not recognize the `validateOnBlur` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `validateonblur` instead. If you accidentally passed it from a parent component, remove it from the DOM element.