Skip to content

Support setting options after value thru props - #79

Closed
farism wants to merge 1 commit into
JedWatson:masterfrom
farism:master
Closed

Support setting options after value thru props#79
farism wants to merge 1 commit into
JedWatson:masterfrom
farism:master

Conversation

@farism

Copy link
Copy Markdown

No description provided.

@JedWatson

Copy link
Copy Markdown
Owner

@farism can you explain this a bit please? looks like some important logic (e.g. if (newProps.value !== this.state.value)) has been removed.

@farism

Copy link
Copy Markdown
Author

From my understanding, that line of code is purely an optimization technique? The issue is that if options are set after value, then the component will not be properly updated (and label placeholder does not change). See #74

It's hard to tell without tests, but I don't believe the code is harmful. I don't think there is an issue with calling getStateFromValue each time props change. I've been using this fork in a few development projects the past couple weeks, but I cannot make any guarantees.

@farism

Copy link
Copy Markdown
Author

Just realized that #53 pretty much addresses the same issue :)

@dcousens

Copy link
Copy Markdown
Collaborator

Please rebase. Happy to merge this or #53

@dcousensdcousens closed this May 7, 2015
@dcousensdcousens reopened this May 7, 2015
@dcousensdcousens self-assigned this May 7, 2015
@dcousensdcousens added this to the 0.4.9 milestone May 7, 2015
@brudersteinbruderstein mentioned this pull request Jul 16, 2015
@Reggino

Copy link
Copy Markdown

I'm running into the same issue here. The fix looks good, thanks!

@dcousensdcousens assigned JedWatson and unassigned dcousensJul 21, 2015
Sign up for freeto 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

@farism@JedWatson@dcousens@Reggino@faris-iws