fix(TetherContent): rerender when other props change#128
Merged
eddywashere merged 1 commit intoreactstrap:masterfrom Sep 8, 2016
Merged
fix(TetherContent): rerender when other props change#128eddywashere merged 1 commit intoreactstrap:masterfrom
eddywashere merged 1 commit intoreactstrap:masterfrom
Conversation
Fix reactstrap#125 Let the TetherContent rerender when any props change while it is showing. This allows the children to update dynamically without needing to hide and show the content to force the update.
| const instance = wrapper.instance(); | ||
|
|
||
| expect(TetherContent.prototype.componentWillUnmount.calls.count()).toBe(0); | ||
| expect(TetherContent.prototype.componentDidMount.calls.count()).toBe(1); |
Member
Author
There was a problem hiding this comment.
I threw this in here, the test didn't make any sense saying show should be called on unmount. Seemed like a copy paste from the one above it. Now this tests to make sure the show is called when the component did mount.
Member
|
Thanks @TheSharpieOne |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #125
Let the TetherContent re-render when any props change while it is
showing. This allows the children to update dynamically without
needing to hide and show the content to force the update.
This also includes tests, but no additional docs as this is not a feature, but something that should just work this way.
If you would like me to add to the docs to document this, let me know and I will adjust this PR.