Add a stateful popover #4097

Closed
x3ro opened this Issue Jul 16, 2012 · 3 comments

4 participants

@x3ro

When creating a popover with HTML data, lets say a checkbox for example, the state of the checkbox isn't kept if the popover disappears and then reappears. This is because the entire popover is always re-rendered. I needed a more "stateful" behavior whose implementation can be seen in this gist. Basically I just created a flag to see if the popover has already been initialized, and skipped initialization if that is the case.

@webxl

Not sure if this should be in a new issue, but it would be nice to have the content rendered immediately (offscreen perhaps), so you could get a reference to it for event binding.

@sumityadav

+1 or alternative on how we can achieve this functionality.

@fat
Bootstrap member
fat commented Feb 8, 2013

not a super easy way –

but one way would be to just use the hide event to pull down the current state and directly update the instances html option with the html you want.

@fat fat closed this Feb 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment