Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input props pollute field state #370

Open
kettanaito opened this issue Feb 27, 2019 · 0 comments
Open

Input props pollute field state #370

kettanaito opened this issue Feb 27, 2019 · 0 comments
Labels
bug scope:architecture Changes affect architecture.
Milestone

Comments

@kettanaito
Copy link
Owner

kettanaito commented Feb 27, 2019

Environment

  • react-advanaced-form: 1.6.7

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.

@kettanaito kettanaito added bug scope:architecture Changes affect architecture. labels Feb 27, 2019
@kettanaito kettanaito added this to the Bugs milestone Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug scope:architecture Changes affect architecture.
Projects
None yet
Development

No branches or pull requests

1 participant