-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Slider: can't type in random number if the min value is not 0 #3107
Comments
would you mind creating a Code Sandbox that illustrates the issue you are facing? |
We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions. |
As there's been no activity since this issue was marked as stale, we are auto-closing it. |
@emyarod Look at the component below: Now, If I want to input the value 25, it just change to 105: Also, I can't delete the value and leave the input box blank which is not good. |
Can you link to the CodeSandbox you are referencing? |
^ It's the link of the CodeSandbox we provide, could you please put the link to yours? |
@asudoh I'm sorry, but I can't understand how should I provide my codesandbox to you? I just copy the link and paste here. Could you tell me the way to provide it? |
You can click on the fork button that gives you a new URL. That's when you can start putting your stuff. |
I can reproduce this issue with carbon-components v10.10.1 and carbon-components-react v7.10.1. Seems to be fixed in 10.10.2 and 7.10.2, but that has another issue where typing in a number sets anything less than min to I've also seen issues with this version where the value changed on its own each time the component was mounted (probably related to the previous issue). And another issue with this version setting state too many times when the component mounts, causing my react app to crash. Here is my sandbox where you can view behavior of the two versions I mentioned above: https://codesandbox.io/s/sleepy-morse-qt1bz |
Seems that there is a recent regression, reopening. |
This change ensures that `<Slider>` won't force changing the value that user types in the `<input>`. For example, if we set 3 to `min` and user wants to type 100 in the `<input>`, this change ensures `<input>` won't become 3 (the minimum value) as soon as user types 1 (the first character in 100). Fixes carbon-design-system#3107.
This change ensures that `<Slider>` won't force changing the value that user types in the `<input>`. For example, if we set 3 to `min` and user wants to type 100 in the `<input>`, this change ensures `<input>` won't become 3 (the minimum value) as soon as user types 1 (the first character in 100). Fixes #3107.
@asudoh I met this same issue,may I know which carbon version includes the fix? Thanks. |
@hongcbjch looks like any version above |
@tw15egan Thank you. |
For the Slider component, I set the min to a non-zero value(10 for example). Then if I want to input a value 20, 30, 40, etc, the value will be set to other value and I can't input my needed value. Also, if I want to delete the value in the textbox, it could be set to the min value.
The text was updated successfully, but these errors were encountered: