feat(popover,tooltip): Support something akin to 'selector' in BS4 popover
See original GitHub issueref: http://v4-alpha.getbootstrap.com/components/popovers/#options
Use case: allow popover to be delegated to 3rd-party components. It could support selectors or (more importantly) element refs.
For instance, I’m using a component from a module and I want to have a popover point to it, but its not positioned exactly where its parent element is, so putting the popover on the parent doesn’t look right. The only way I can get it to work properly is to add ngbPopover
directly to the component’s template.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Popovers - Bootstrap
Popovers that use delegation (which are created using the selector option) cannot be individually destroyed on descendant trigger elements. Copy. $('#element').
Read more >Bootstrap 3 popover & tooltip on same element - Stack Overflow
I'm trying to simply add a popover and tooltip to an element, ... The popover works as it should but the tooltip doesn't...
Read more >Bootstrap popover - YouTube
Tagsbootstrap popover examplesbootstrap popover on hoverbootstrap popover on hover and clickbootstrap popover close on click ...
Read more >Bootstrap Popovers - examples & tutorial
Responsive popover built with the latest Bootstrap 5. Popover is like a tooltip, but it can persist after hovering off. It allows displaying...
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
Similar real-life example:
I am using Fullcalendar in an application and want to be able to bind popovers to the calendar events to show details at a glance.
I am able to work around the problem and get popovers to work in a dirty way. I defined a single popover element in the HTML and in the TS component I reference the popover via ViewChild and set title and content. To correct the location I set the private _elementRef variable and it seems to work, and just ignore the ts errors with @ts-ignore.
This is a quick and dirty workaround and something as simple as exposing the _elementRef or better yet adding a function to change the _elementRef could do the trick. My first thought was to extend the NgbPopover class or add a prototype function but wasn’t successful and have read on other issues that extending features of NG-Bootstrap isn’t really feasible.
@cribbstechnologies From my package.json: “@fullcalendar/angular”: “^4.3.1”
I am using pretty standard code for the template:
It has been a while since I’ve had to mess with this part of my app so I may be forgetting some details. Let me know if you need anything else