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

EuiFieldNumber stuck on natively invalid state when used as a controlled input and value is directly changed outside the input #7281

Closed
tgalfin opened this issue Oct 12, 2023 · 2 comments · Fixed by #7291
Assignees
Labels

Comments

@tgalfin
Copy link
Contributor

tgalfin commented Oct 12, 2023

Describe the bug
Eui field number gets stuck on natively invalid state when used as a controlled input and value is changed by any means other than interacting with the input itself.

Impact and severity
This bug makes the EuiFieldNumber input not useable as a controlled input that can be changed by means other than directly interacting with the input. This should be an easy fix.

Environment and versions

  • EUI version: 89.0.0
  • React version: 18.2.0
  • Browser: Firefox
  • Operating System: Mac OS 13.4

To Reproduce

  • Go to the code sandbox here
  • Manually change the input to have a value of 9
    • You should see the warning icon on the right, indicating the input is natively invalid for exceeding its max value
  • Now click the button that says "set value to valid"
    • The value will change to a valid number, but the natively invalid warning icon will still be there. You have to focus and then blur the input to clear the invalid warning

Expected behavior
Ideally natively invalid state should be checked on any value change rather than just on blur or change via the input.

Minimum reproducible sandbox

  • See sandbox link in "To Reproduce" section
@tgalfin tgalfin added bug ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible labels Oct 12, 2023
@cee-chen cee-chen removed the ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible label Oct 16, 2023
@JasonStoltz
Copy link
Member

Moving to On Hold -- broken tests in PR, might be fixed by upgrading Jest

@tgalfin tgalfin closed this as completed Oct 25, 2023
@cee-chen
Copy link
Contributor

@tgalfin Was this an accidental close? This isn't actually resolved on our end yet

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

Successfully merging a pull request may close this issue.

3 participants