Class for the created child inside body when using antd popover
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
Antdpopover currently can only be styled in a very limited way using ugly workarounds due to how and where the popover is created (wrapped inside two divs, which are attached as direct child of body) It would be nice to have a class for the outermost div. In our specific case, the popover is not displayed correctly while scrolling, since the popover is embedded inside a fixed container and the wrapper has position absolute.
What does the proposed API look like?
<div class="new class name goes here" someinlinestyle>
<div>
<div class="ant-popover ant-popover-placement-bottomRight" inlinestyle>
...
</div>
</div>
</div>
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Popover - Ant Design
The floating card popped by clicking or hovering. When To Use. A simple popup menu to provide extra information or operations. Comparing with...
Read more >How to Render a React Component Inside a Bootstrap Popover
You'll have the Bootstrap CSS link in the head, and the jQuery, Popper.js and Bootstrap script just before the body ends.
Read more >customize antd tooltip styles using styled components
Here you can just pass the triggerNode to be the parent object and your styles are set as expected. const Styled = styled.div`...
Read more >Overlays | React-Bootstrap
Creating an Overlay# ... Overlays consist of at least two elements, the "overlay", the element to be positioned, as well as a "target",...
Read more >Popover | Components - BootstrapVue
The Popover feature provides a tooltip-like behavior, can be easily applied to any interactive element via the component or v-b-popover directive.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! This did the job (and my bad for the link). For future reference I think it would be better if you add an explanation instead of writing it inside the CSS class though 😃
For anyone having the same issue:
getPopupContainer={node => node.parentNode}
basically adds the popover inside the container where you have the Popover component of antd instead of into the body (which is the default).