question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lazy-val-bcommented, Jul 20, 2018

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).

1reaction
afc163commented, Jul 20, 2018
image
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found