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

Unable get value of an input field before focus switch #264

Open
ektar opened this issue Jun 30, 2023 · 0 comments
Open

Unable get value of an input field before focus switch #264

ektar opened this issue Jun 30, 2023 · 0 comments

Comments

@ektar
Copy link

ektar commented Jun 30, 2023

Having issue where we seem unable to get value of input field before user switches focus

Example use case: Simple form with 1 text input field, must be filled out then submit button can enable.

Attempted implementation: connect to "change" events on input field, after each change event, look at the v_model and if not empty, enable the submit button

Problem observed: User enters text but submit still disabled. "Change" event doesn't fire when user finishes, only when focus switches

Attempted solution: Connect to keyup event, but seems no way to get the current value of the input field

Should be able to work-around by making a custom template object with javascript (e.g. https://stackoverflow.com/questions/59191213/how-to-get-current-value-on-keypress), but should there be some way to do this without making custom template?

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

No branches or pull requests

1 participant