Skip to content

EuiSuperSelect inputDisplay Does not support falsey values #7359

@robert-seymour-numerated

Description

Describe the bug
for EuiSuperSelect, if the option values are falsey, then the valueOfSelected prop will not properly display the label when the falsey option is selected

Example options prop

[
    { value: true, inputDisplay: "True Display" },
    { value: false, inputDisplay: "False Display" },
]

Example GIF
CleanShot 2023-11-13 at 16 31 57

Impact and severity

Environment and versions

  • EUI version 76.0.0 (Though I believe it impacts the latest version as well):
  • React version:
  • Kibana version (if applicable):
  • Browser:
  • Operating System:

Expected behavior
A selected option of false would still render the display label for the super select

Minimum reproducible sandbox
It is extremely helpful for us if you are able to reproduce your issue in a minimum reproducible sandbox (visit our docs site and click the CodeSandbox logo in the top-right corner).

Additional context

I believe the source is located here. We are guarding against an undefined selectedOption, but that is too broad and will filter out false as well

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions