Skip to content

Clear input value on receiving props with another value.#2183

Merged
JedWatson merged 2 commits intoJedWatson:masterfrom
yuri-sakharov:bug/clear-input-value
Dec 13, 2017
Merged

Clear input value on receiving props with another value.#2183
JedWatson merged 2 commits intoJedWatson:masterfrom
yuri-sakharov:bug/clear-input-value

Conversation

@yuri-sakharov
Copy link

Hi,
Should be fixed this bug #2155.
Thanks.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 93.45% when pulling d212323 on yuri-sakharov:bug/clear-input-value into 75f3043 on JedWatson:master.

@JedWatson
Copy link
Owner

Solid fix @yuri-sakharov, thanks!

@JedWatson JedWatson merged commit 700b79a into JedWatson:master Dec 13, 2017
@yuri-sakharov yuri-sakharov deleted the bug/clear-input-value branch December 14, 2017 07:35
@yuri-sakharov
Copy link
Author

@JedWatson thank you too.

@jharris4
Copy link
Contributor

FYI this was a breaking change for me (and took me a little while to track down after upgrading!)

My value prop (actually a list of values since I'm in multi mode) are coming from an immutable collection which I was converting to an array of values in a render function.

I had to refactor things to instead do the conversion in componentWillReceiveProps (only if the immutable collection changed) and assign to state for use in the render function.

I can see the value of this PR, but it might be helpful to draw attention to it in the docs or something in case other people get tripped up by this as well.

@yuri-sakharov
Copy link
Author

Hi, @jharris4
Thank you for comment I fixed it in #2299

@hiredgun
Copy link

hiredgun commented Jun 12, 2018

@yuri-sakharov why wasn't this fix merged?

@yuri-sakharov
Copy link
Author

@hiredgun I don't know and don't have rights for merge. The question should be addressed to collaborators.

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.

5 participants