eui
eui copied to clipboard
[EuiDualRange] + [EuiRangeInput] types are too permissive and don't match
Summary
Change all occurrences of number | string types to only allow number
Why?
It's confusing accepting both. I realize this was probably done to pave over whatever craziness the DOM might return, but I think pushing a parseInt into consuming apps is worth the type checking cleanliness.
Especially when it's inconsistent with EuiRangeInputProps which only accepts number for min and max which means to validate that your value falls in between your min and your max you have to jump through a bunch of hoops with types.
@thompsongl Looks like you wrote this component, what do you think?
Looks like you wrote this component, what do you think?
Definitely worth taking another look.
These were originally loosely prop-typed JS components, and when I converted them to TS I tried to avoid breaking changes.
@thompsongl So what all changes would you like me to make?
"Change all occurrences of number | string types to only allow number" in EuiDualRange and EuiRangeInput
This is 1) a breaking change and 2) will require simplifying all the related places we do string to number conversions.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.