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

Input prop value blank string not updating #240

Closed
strandoe opened this issue Jul 30, 2019 · 2 comments · Fixed by #241
Closed

Input prop value blank string not updating #240

strandoe opened this issue Jul 30, 2019 · 2 comments · Fixed by #241
Labels

Comments

@strandoe
Copy link

🐛 Bug Report

The Input component does not update internal value state when supplied blank string as value in props. Input.getValue() calls processChildren() when props.value evaluates to false (as empty string does), resulting in a null value because props.children is null. Input.getDerivedStateFromProps() does not update state.value when Input.getValue() returns null.

To Reproduce

Supply Input with non-empty string as value prop. Change value prop to be an empty string. Input still displays the old value, instead of empty string.

Expected behavior

Input should be empty.

Run npx envinfo

Paste the results here:

  System:
    OS: Windows 7
    CPU: (2) x64 Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
    Memory: 1019.60 MB / 8.00 GB
  Binaries:
    Node: 10.15.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Bash: 4.4.12 - C:\tools\cygwin\bin\bash.EXE
    Python: 2.7.16 - /cygdrive/c/Python27/python
  Browsers:
    Internet Explorer: 11.0.9600.19400
@tujoworker
Copy link
Member

Thank You Øystein (@strandoe) for the good explained report 👌🏻 keep an eye on the next release #242

@tujoworker
Copy link
Member

🎉 This issue has been resolved in version 4.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants