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

TextField.js - componentWillReceiveProps - Changing this.props.text t… #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

giladartzi
Copy link

…o this.state.text

The scenario is like so:

  1. TextField is focused, but does not have a value.
  2. props are changing
  3. componentWillReceiveProps is triggered, and it's comparing this.props.text to this.props.value.
  4. this.props.text is undefined and does not equal this.props.value which is an empty string
  5. sinkLabel function is called, but TextField is still focused. (This is the issue)

In my opinion, text value should be read from the state and not the props.

Please let me know what you think :-)

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

Successfully merging this pull request may close these issues.

None yet

1 participant