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

PopoverContent not re-rendering #125

Closed
zeroasterisk opened this issue Sep 6, 2016 · 4 comments · Fixed by #130
Closed

PopoverContent not re-rendering #125

zeroasterisk opened this issue Sep 6, 2016 · 4 comments · Fixed by #130

Comments

@zeroasterisk
Copy link
Contributor

If you edit the props for PopverContent, and it's already open, it doesn't re-render the content until closed and opened again.

Take a look at the following codepen... just open one and let it sit for a few seconds...
http://codepen.io/zeroasterisk/pen/zKxgrJ

You can see in the console.log that the state --> props are updating, but the UI is not. If you close and re-open the popover, it shows the new/current props.

@eddywashere
Copy link
Member

It's likely missing the rerender on prop update. Right now it checks if isOpen changed. Not an issue if the inner content is self contained, I think. Definitely need to fix this use case. Thanks for reporting!

TheSharpieOne added a commit to TheSharpieOne/reactstrap that referenced this issue Sep 7, 2016
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.
@TheSharpieOne
Copy link
Member

Yeah, the TetherContent only updates the content when it hides/shows. It needs a check for if it is showing/there is a container/element when the props change and to rerender (for a reason other than show/hide) the subtree if the container is there (similar to how the modal updates).

eddywashere pushed a commit that referenced this issue Sep 8, 2016
Fix #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.
@eddywashere
Copy link
Member

Fix published in 3.0.1

@eddywashere
Copy link
Member

Updated Example pointing to 3.0.1: http://codepen.io/eddywashere/pen/Xjbkmx

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

Successfully merging a pull request may close this issue.

3 participants