kettanaito / react-advanced-form

Functional reactive forms. Multi-layer validation, custom styling, field grouping, reactive props, and much more.
https://redd.gitbook.io/react-advanced-form
MIT License
217 stars 24 forks source link

Input props pollute field state #370

Open kettanaito opened 5 years ago

kettanaito commented 5 years ago

Environment

What

Current behavior

Seems that all custom props passed to the input component end up in the field state in the form.

Expected behavior

Field state contains explicit set of fields. Custom input component props do not reside there, as field state shouldn't maintain them.

Why

Most likely, there is some object spreading somewhere, that enlists all custom props into the field state. I suggest to look into some createField options (beforeRegister?) first.