Skip to content
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

NumericInput triggers change event when received prop is changed #3795

Closed
iongion opened this issue Oct 25, 2019 · 1 comment · Fixed by #3814
Closed

NumericInput triggers change event when received prop is changed #3795

iongion opened this issue Oct 25, 2019 · 1 comment · Fixed by #3814
Assignees
Milestone

Comments

@iongion
Copy link

iongion commented Oct 25, 2019

Environment

  • Package version(s): 3.19 series
  • Browser and OS versions: Any

https://codesandbox.io/s/react-typescript-lcxes

Steps to reproduce

  1. Open sandbox console
  2. Press the plus or minus buttons before the numeric stepper's
  3. See how onValueChange is really triggered by a received changed prop
  4. Switch the @blueprintjs/core version of the sandbox to 3.18.x
  5. Do as at 2
  6. Notice how onValueChange does not get triggered by a received changed prop

Actual behavior

Received prop triggers change

Expected behavior

Received prop should not trigger change, just like in the 3.18 series

Possible solution

Except reverting to 3.18 I have no idea

@iongion
Copy link
Author

iongion commented Oct 31, 2019

Did some more investigations, apparently is due to refactoring from componentWillReceiveProps to componentDidUpdate. As component componentDidUpdate triggers even after setState, maybe this is the issue. It happened in commit tobilen/blueprint@8ce4d59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants