Skip to content

EuiDualRange jumps to outer values when using empty strings as range values #6853

@tkajtoch

Description

@tkajtoch

Describe the bug

When <EuiDualRange> receives empty strings as any of the values (e.g. ['', '']), it may incorrectly jump to outer values when user is changing its value and report invalid state.

Environment and versions

  • EUI version: 82.1.0
  • Browser: Chrome / any
  • Operating System: MacOS / any

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/vibrant-tree-wc5i7g?file=/demo.js
  2. Move the lower value slider to the right until it reaches 76
  3. See that the slider moved to min - 76 instead of the expected 76 - max

Expected behavior

  1. Using empty strings as any of the values should result in setting these values to min or max.
  2. Slider should not jump to unexpected values

Minimum reproducible sandbox

https://codesandbox.io/s/vibrant-tree-wc5i7g?file=/demo.js

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