Skip to content
This repository has been archived by the owner on May 15, 2022. It is now read-only.

Bug: min and max can be gotten around in DatNumber #45

Open
josh-peterson-bose opened this issue Jan 8, 2020 · 1 comment
Open

Bug: min and max can be gotten around in DatNumber #45

josh-peterson-bose opened this issue Jan 8, 2020 · 1 comment
Labels

Comments

@josh-peterson-bose
Copy link

Steps to repro:

  1. Focus a DatNumber field.
  2. 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.
  3. Type "1". Notice the value of the "Number" at left now says 166, ignoring the max of 100.
  4. You can also try this by inserting a minus sign. The number will say "-66" ignoring the min of 0.
@josh-peterson-bose josh-peterson-bose changed the title Bug: min and max can be gotten around in DatNumber / Dat Bug: min and max can be gotten around in DatNumber Jan 8, 2020
@jdbence
Copy link

jdbence commented Feb 29, 2020

@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);
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants