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] Improve step validation #7202

Closed
wants to merge 6 commits into from

Commits on Sep 19, 2023

  1. Configuration menu
    Copy the full SHA
    544e705 View commit details
    Browse the repository at this point in the history
  2. Write tests

    + move DRY checks so both describe blocks can use them
    cee-chen committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    0207229 View commit details
    Browse the repository at this point in the history
  3. [cleanup] DRY out isInvalid logic

    + `aria-invalid` undefined logic
    cee-chen committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    712b079 View commit details
    Browse the repository at this point in the history
  4. Add extra custom invalid message logic to EuiValidatableControl

    + add a type that allows the `number` input to show the browser step invalid error message
    
    - Otherwise, the input just unhelpfully shows 'Invalid' instead
    
    + Add missing unit tests for `useSetControlValidity`
    cee-chen committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    f6cabeb View commit details
    Browse the repository at this point in the history
  5. Fix/add catch for bizarre browser behavior

    - If an `input type="number" is instantiated with a mismatched `step` and `value/defaultValue`, the input acts SUPER erratically at that point and browser validation can't be reconciled. The best we can do is warn and stop checking
    cee-chen committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    629f34c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5b4109f View commit details
    Browse the repository at this point in the history