react-dat-gui
react-dat-gui copied to clipboard
Bug: min and max can be gotten around in DatNumber
Steps to repro:
- Focus a DatNumber field.
- Move the cursor to the beginning of the number entered. Eg if the number is 66 as in the demo, move the cursor before the first 6.
- Type "1". Notice the value of the "Number" at left now says 166, ignoring the max of 100.
- You can also try this by inserting a minus sign. The number will say "-66" ignoring the min of 0.
@rohan-deshpande Can we get <DatNumber/>
to have the same behavior for <Input/>
and the <Slider/>
? Looks like we can just reuse handleSliderUpdate
PR #49
From this
handleChange = event => {
const { value } = event.target;
this.update(value);
};
To this
handleChange = event => {
const { value } = event.target;
this.handleSliderUpdate(value);
};