widgetti / widgetti/ipyvuetify

Unable get value of an input field before focus switch

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
355
Forks
61
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the input-field behavior described for change and keyup events, checking when v_model receives the entered value. Trace ipyvuetify's input event and v_model handling; done means a submit control can react to typed text before focus switches without requiring a custom JavaScript template.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.