Closed Vladimirtishenko closed 5 years ago
Hi can you reproduce your issue here? It's not so clear from your pieces of code
So here is your fixed example
This library works with controlled components. It means you must control your Input
component outside of itself. So you must move onChange
to upper level and control value in Main
component.
Did you mean i must change the props all the time?
Yes, this is how it's working
Will be better if it works without pass some props from outside) Because of it we should make another one wrapper)
¯_(ツ)_/¯
Hi. Many things doesn't work. I have code example:
and part of my Input component:
1: when page is loaded validation start to run even if instantValidate={false}. 2: when i try to change input value -validation started again. 3: I can't change input value through method onChange, value doesn't change because of method in your component getDerivedStateFromProps 4: When i submit the form your component get old value that was when the page loaded, and validation passing, however value in field have already deferent value.
Can you clarify something?