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

Bug fix for #3136 - Update state when scheme options change #3295

Merged
merged 2 commits into from Jun 29, 2017
Merged

Bug fix for #3136 - Update state when scheme options change #3295

merged 2 commits into from Jun 29, 2017

Conversation

owenconti
Copy link
Contributor

@owenconti owenconti commented Jun 25, 2017

Fixes #3136 - Update 'selected' operation scheme when the options change and the previously selected scheme is no longer available.

Ideally, I'd prefer if this were done entirely in the reducer (on UPDATE_SPEC), but I couldn't find an async action example. That being said, since a similar method of updating state is done in 's componentWillMount, I figured updating via the component would be okay. Please let me know if that assumption is incorrect.

…ously selected option is no longer available
@webron webron requested a review from shockey June 26, 2017 22:17
@shockey
Copy link
Contributor

shockey commented Jun 29, 2017

@owenconti, we ended up in parallel universes 😱 see #3317 and #3166.

I agree with you on keeping the logic in the reducer, but my changes ended up having logic in componentWillReceiveProps as well. Didn't see a good place for it in the reducer.

FYI: I kept your implementation of the method since it's more verbose.

@shockey shockey merged commit 4d52c30 into swagger-api:master Jun 29, 2017
@owenconti owenconti deleted the bug/3136-operation-scheme-update branch July 3, 2017 22:23
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

2 participants