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: Updating defaultValue doesnot update the value in input. #1564

Closed
bhrayala opened this issue Apr 20, 2017 · 3 comments · Fixed by #5903
Closed

Textfield: Updating defaultValue doesnot update the value in input. #1564

bhrayala opened this issue Apr 20, 2017 · 3 comments · Fixed by #5903

Comments

@bhrayala
Copy link

Bug Report

  • Package version(s): (latest)

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? (No)
Requested priority: (Normal)

Describe the issue:

Updating defaultValue of an uncontrolled component doesnot update the value in input. This causes issues in forms with a reset button or some form of external updates. I suppose simialar issue happens with defaultChecked or any other defaults in other components.

React had a similar issue in their native components which was fixed. facebook/react#4618. This issue has a lenghty discussion on possible ways to fix it for their native input component.

Actual behavior:

Changing default value of Textfield should change the value of input.

Expected behavior:

Changing default value of Textfield doesnot change the value of input.

If applicable, please provide a codepen repro:

http://codepen.io/bunny10245/pen/WjrVxp . Open the codepen in debug mode, in chrome, with react developer plugin, to see that although props of Textfield gets updated, the props of react input element doesnot get updated.

@javierordonezcastro
Copy link

Hi, I have the same problem. Did someone find a solution?
Thank you very much

@stale
Copy link

stale bot commented Apr 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!

@lafe
Copy link
Contributor

lafe commented Apr 27, 2018

I would also be interested in a solution - all workarounds I currently employ are pretty ugly...

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

Successfully merging a pull request may close this issue.

8 participants