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

Input control validation on focus out event #2036

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

kart2004
Copy link

@kart2004 kart2004 commented Oct 12, 2024

Description:

  • Fixes [🐛 BUG] [UX] input, number, date controls don't validate on focus out event #2023
  • Implemented onBlur event handler in the Input.tsx component to trigger value updates when an input field loses focus (focus out event).
  • Ensures that changes are captured even when the Enter key is not pressed, improving the overall user experience.
  • The change impacts text, number, and date input fields to align with the intended behavior.

image

Key changes include:

  • Added onBlur handler to TextField for focus out validation.
  • Ensured that value updates propagate correctly upon focus loss.

Ensured

  • Code is rebased
  • License is present
  • pre-commit works - without mypy error.
  • Taipy tests are passing.

image
image

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any tests

if (changeDelay > 0 && delayCall.current > 0) {
clearTimeout(delayCall.current);
delayCall.current = -1;
dispatch(createSendUpdateAction(updateVarName, val, module, onChange, propagate));
Copy link
Member

@FredLL-Avaiga FredLL-Avaiga Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should always be called
So put outside the if/else block
I think you're right this should only be called if there is delayed call on hold
Sorry about the noise

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I still don't see any tests ;-)
Are you still working on this @kart2004 ?

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

Successfully merging this pull request may close these issues.

[🐛 BUG] [UX] input, number, date controls don't validate on focus out event
2 participants