-
Notifications
You must be signed in to change notification settings - Fork 231
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
Input range is taking in negative even after a positive value is being assigned as minValue #158
Comments
This issue is caused when we click on the minimum range near starting. It is something random either on a single or double click. It might be an issue with the core code. For now, the patch we can apply is via onChange function. Make it
I am assuming your minimum value is 10 here because it is mine. Just replace 10 with your minimum value. This is not pure function but you get the logic here. |
When i added this, or it was like this before (idk). The max value acts the same way, to fix: |
Even after setting min value for the react input range the slider is accepting negative value, below is the code and the attachment necessary for the issue.
this.state = {
value: { min: 8000, max: 75000 }
}
<InputRange
formatLabel={value =>
${this.convertToIndianFormat(value)}kms
}maxValue={100000}
minValue={0}
ref="input_range"
value={this.state.value}
onChange={value => this.setState({ value })}
onChangeComplete={value => this.bindDistanceRange(value.min, value.max, this.cityName, this.sortObject, this.searchText)}
/>
The text was updated successfully, but these errors were encountered: