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

update text inputs to use focus/blur instead of on-change #141

Open
yogthos opened this issue Mar 17, 2018 · 4 comments
Open

update text inputs to use focus/blur instead of on-change #141

yogthos opened this issue Mar 17, 2018 · 4 comments

Comments

@yogthos
Copy link
Member

yogthos commented Mar 17, 2018

Currently, inputs recompute on each key press, it would be better to update inputs once when the user finishes typing.

@madstap
Copy link
Contributor

madstap commented Mar 22, 2018

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).

@yogthos
Copy link
Member Author

yogthos commented Mar 22, 2018

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.

@njj
Copy link

njj commented Mar 22, 2018

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.

@camachom
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants