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

Adding documentation on <Popover />'s mountNode #157

Closed
jefffriesen opened this issue Jul 22, 2014 · 5 comments
Closed

Adding documentation on <Popover />'s mountNode #157

jefffriesen opened this issue Jul 22, 2014 · 5 comments
Labels
docs Documentation related help wanted

Comments

@jefffriesen
Copy link

The container={mountNode} is a bit mysterious in the popover documentation. I see where it's defined in the docs:

 executeCode: function() {
    var mountNode = this.refs.mount.getDOMNode();

But which node it should reference is hard to decipher. I've tried

  componentDidMount: function() {
    var mountNode = this.refs.button.getDOMNode()
}

With no luck (it's still positioned incorrectly). A little bit of documentation of what this node should refer to and how to access it would be really helpful.

@pieterv
Copy link
Contributor

pieterv commented Jul 23, 2014

Hey @jefffriesen, yeah the popover docs definitely need some work :P, i'm happy to help with your specific case in the mean time if you leave some code of what your trying to do. Generally you wouldn't need to set the container prop as it defaults to body which is usually fine for most cases. These are the docs from the bootstrap site which might be all we need?

Appends the tooltip to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.

@jefffriesen
Copy link
Author

Thanks for the reply and the offer. I had to get it done so I just used the vanilla-React approach (no library) using getInitialState() and setState to show and hide the Popover component. I may go back to using this library at some point.

But as for the documentation, you're right the Bootstrap docs note you added above would be helpful. I still how to retrieve mountNode is a little mysterious, so an example with that would be great.

@dozoisch dozoisch added this to the 1.0.0 Release milestone May 3, 2015
@taion
Copy link
Member

taion commented May 9, 2015

This feature actually looks to be broken right now. The example on the components page with scrolling popovers sets container, but renders the popover in the wrong place:

image

@taion
Copy link
Member

taion commented May 13, 2015

This actually is demonstrated in the components demo, though it's broken due to some weirdness. Do we need additional documentation beyond what's there?

@taion
Copy link
Member

taion commented May 14, 2015

Will add further documentation on container with #173.

@taion taion closed this as completed May 14, 2015
aryad14 pushed a commit to aryad14/react-bootstrap that referenced this issue Oct 11, 2023
* moved from mocha to jest

* better config options to jest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related help wanted
Projects
None yet
Development

No branches or pull requests

5 participants