I'm getting these two warnings Failed prop type: Invalid prop value supplied to Slider and Failed prop type: Invalid prop defaultValue supplied to Slider.
I don't see any issues, everything works fine, but I get those warnings in the console.
The render function is as follows :
const min = this.props.min;
const max = this.props.max;
const low = this.state.low;
const high = this.state.high;
console.log("Low : " + low);
console.log("High : " + high);
console.log("Min : " + min);
console.log("Max : " + max);
return (
<div>
<Rcslider min={min} max={max} range allowCross={false} defaultValue={[low, high]} value={[low, high]} onChange={this.handleRangeChange.bind(this)}/>
</div>
)
The result for the state values which I get when the component renders is :
Low : 123
High : 827256
Min : 123
Max : 827256
What am I doing wrong?
A re-producible online demo, please.
make sure low/high are numbers and not strings
Most helpful comment
make sure low/high are numbers and not strings