[🐛 BUG] [UX] input, number, date controls don't validate on focus out event
What went wrong? 🤔
The input control (as well as number, data, ...) does not trap the Focus Out event that should trigger the equivalent of pressing the Enter key
Expected Behavior
See description.
All input, number, date should be impacted.
login probably...
Acceptance Criteria
- [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
- [ ] Create related issue in taipy-doc for documentation and Release Notes.
Code of Conduct
- [X] I have checked the existing issues.
- [ ] I am willing to work on this issue (optional)
Hi @FabienLelaquais, I'd love to work on this issue. Could you please assign it to me?
I have assigned you this issue @kart2004 !
Hi @FabienLelaquais, I'd love to work on this issue. Could you please assign it to me?
could you please tell how are you working on this issue
I guess all you have to do is add an event handler to the 'onBlur' attribute of the TextField component used by the input control.
That would be in frontend/taipy-gui/src/components/Taipy/Input.tsx.
This should act just like 'onChange'.
@AlexandreSajus @FabienLelaquais Hey please assign the issue to me
This issue has been assigned already, @TecHAyusH6476 & @Anudhyan. Sorry
This issue has been assigned already, @TecHAyusH6476 & @Anudhyan. Sorry
It's ok . I just wanted to know how to approach this issue, which you already clarified. Thanks
What went wrong? 🤔
The input control (as well as number, data, ...) does not trap the Focus Out event that should trigger the equivalent of pressing the Enter key
Expected Behavior
See description.
All
input,number,dateshould be impacted.loginprobably...Acceptance Criteria
- [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
- [ ] Create related issue in taipy-doc for documentation and Release Notes.
Code of Conduct
- [x] I have checked the existing issues.
- [ ] I am willing to work on this issue (optional)
Assing me this issue
Is this issue worked on ?
I can assign this issue but this is already worked on by other contributors @Heisen47
I can assign this issue but this is already worked on by other contributors @Heisen47
I am a newbie but I am still trying my best
Please try to assign this issue to me if possible.
@developervick A PR is open, do you want to collaborate on this issue?
To address the issue of input fields not triggering actions on focusout, I propose adding an event listener to detect the focusout event for all relevant inputs (e.g., number, date fields). This listener would trigger the same function as pressing Enter, ensuring the expected action occurs when focus is lost. I'll ensure thorough unit tests for these handlers, aiming for 90% coverage. This approach should improve user experience across input fields. Would love to hear your feedback!
I am willing to work on this issue @jrobinAV
@hustler0109, Thank you for your help. You can propose your PR to solve the issue. You can also collaborate with the other assignees having a look at their PRs and help us reviewing them.
This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.
This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.
The proposal: a new Boolean property called validate_on_blur that, if True, will consider the blur event as a validation.
We could test if the value really changed.
Why is it not just another action key? Date range should also be impacted!
"Why is it not just another action key?" What do you mean?
"Date range should also be impacted!": you mean date, time and date_range right?
That's not yet done despite the issue description. But it will, yes.
Adding to the list of action_keys something like click_event. In your on_action callback, you will be able to know what to do when you receive the action key pressed in the payload
You may not receive a key at all. Like you click on a button...
Clicking is a kind of key and so is clicking on a button; this is what I would have said