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

[EuiSuperSelect] Allow rendering falsy but not nullish values #7362

Merged
merged 10 commits into from
Nov 16, 2023

Commits on Nov 14, 2023

  1. [REVERT ME] Docs QA

    cee-chen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    344e430 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6fc2fb8 View commit details
    Browse the repository at this point in the history
  3. [fix] Allow falsy value

    + also fix selectedValue not using defaultValue, even though the input does
    cee-chen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    6382025 View commit details
    Browse the repository at this point in the history
  4. [typing] Allow consumers to type EuiSuperSelect values to non-strings

    e.g. booleans, numbers, etc.
    cee-chen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    a821313 View commit details
    Browse the repository at this point in the history
  5. [opinionated] Prevent nullish values from being rendered in the dropd…

    …own menu
    
    - to reduce UX confusion when options are shown in the dropdown but not the input
    
    nb: propTypes throws a dev error on this, but IMO it's better for the end-user to just not render the option at all
    cee-chen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    db5f400 View commit details
    Browse the repository at this point in the history
  6. [tech debt] Improve EuiSuperSelect tests

    - convert from Enzyme to RTL
    - DRY out open dropdown logic
    - make the initial it renders test capture the portalled dropdown - no need to make a separate test for that
    - remove unnecessary portal mock
    - replace snapshots with specific assertions where it makes sense
    - remove unnecessary `onChange={() => {}}` and write an actual onChange test
    - remove other props if they're not actually being used by the test
    cee-chen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    1fe90f7 View commit details
    Browse the repository at this point in the history
  7. [perf] reduce rerender shenanigans

    `= []` will cause a new instantiation every rerender, which makes the useMemo useless - just optional chaining instead
    cee-chen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    0bd2636 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    61804f7 View commit details
    Browse the repository at this point in the history
  9. changelog

    cee-chen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    e15fc04 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Revert "[REVERT ME] Docs QA"

    This reverts commit 344e430.
    cee-chen committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    55ae09e View commit details
    Browse the repository at this point in the history