Open yogthos opened 6 years ago
Maybe this could be a knob that defaults to on-blur? Not sure I have a really compelling usecase for updating on each keypress, but it seems useful to have the choice. (Of course I still have the ability to implement the init-field
multimethod...)
Numeric fields already behave like this, the difference might be causing some confusion (#143).
Yeah, having an option might be better. For desktop browsers, on-change event doesn't tend to cause any issues, however I have seen this become a problem on mobile before.
Additionally, the updating of the state is generally the responsibility of us rather than the lib (at least in React land). This gives the developer options to either update on whatever event handler they choose, or not update at all and use refs to grab the values of inputs when generating a payload.
@madstap you're right about #143. I opened the issue because I was confused that it was behaving differently from the rest of the inputs.
+1 for having the option
Currently, inputs recompute on each key press, it would be better to update inputs once when the user finishes typing.