Repository navigation
Conversation
… to override the default behavior of the range handles when the input value is blank.
…-string-override-value
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
|
💚 CLA has been signed |
|
Could use some help getting the documentation updated properly. I believe the text I wrote in the documentation should exist as text next to the prop and not as a paragraph in the doc. However I couldn't figure out how to add the text next to the props. |
|
Thanks for opening this PR with the issue you encountered and proposing a resolution! This is definitely a state we can improve in the range slider. I'm not sure we'd want to define a placeholder value for the thumb when the value is an empty string, and I'm interested in how your team decided on what value to put the thumb at in that case. I'm also curious if you considered about alternative approaches to represent this indeterminate state, such as greying out the handle or some other visual indication. |
I'm not that familiar with @dej611 use case. If the elastic team wants, I can remove the placeholder concept and just default the slider to the minimum range value. I was just providing a solution to the bug that was reported. |
|
Are there any updates on this? |
|
Closing this as it's inactive and has no direction. I'm resuming the discussion in #5186 where other approaches can be explored. |
Summary
In my ticket there was a mismatch between the documentation and the actual behavior of the range control when the value input was blank. The ticket author also requested an enhancement to the control to allow for an override of the default behavior so they could specify the default location of the range handles when the input is blank.
I created a new prop for the range control that would change the location of the range handle when the input is blank. The range handle will still be bound by the range min/max values.
Behavior before my changes:
Behavior after my changes with slider default value set to
0Behavior after my changes with slider default value set to
15Checklist
Checked in both light and dark modesChecked in mobileChecked for breaking changes and labeled appropriatelyChecked for accessibility including keyboard-only and screenreader modesUpdated the Figma library counterpart