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.

Change the popover target dynamically

See original GitHub issue

I am trying to change the target of the popover dynamically, like, I have 5 targets in the template and I want to display the popover where ever I click, for that, I want to change the target onClick. Seems my target value is changing onClick but that doesn’t affect and no popover showing the new target. My sample codes as below, am I missing something? or it’s known issue.

data () {
    return {
      targetZone: 'exPopover3'
    }
  },
  methods: {
    changeTarget(zone) {
      this.targetZone = zone;
    }
  }

template:

<b-btn id="exPopover2" variant="primary" @click="changeTarget('exPopover2')">Using properties</b-btn>
        <b-popover :target="targetZone"
            title="Prop Examples"
            triggers="hover focus"
            content="Embedding content using properties is easy">
        </b-popover>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

20reactions
renaudhamcommented, Dec 16, 2019

Hi. This should not be closed, the unability to retarget a popover to different targets one after the other is a huge perfomance issue. My example here

image

adding one different popover item for each avatar generate a very heavy and slow display.

Currently I played over by adding only one popover by row and just update the content, but the row’s popover remain centered on the whole row’s list of avatar… This is not a correct UI UX experience.

8reactions
Azufcommented, May 9, 2021

This issue is still relevant. There are many cases where a dynamic target can be helpful or needed. I found stack overflow questions about this, none of them had correct answers and the number of views on each of them tells a lot about how much this feature is needed. This Stackoverflow question has over 3K views!! please consider re-opening this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I set b-popover target dynamically in vue js?
Now my problem is, I can't set target dynamically. I want to set the popover target, where user has clicked. I have tried...
Read more >
Popover - Dynamic target - DevExpress Support
You can set the Popover's target property to a non-static property value. In the click event, you can change this value dynamically.
Read more >
Mde Popover Dynamic Target Position - StackBlitz
A material design popover component created using Angular version 4 with the Angular CDK.
Read more >
[Solved]-How can I set b-popover target dynamically in vue js?
Coding example for the question How can I set b-popover target dynamically in vue js?-Vue.js.
Read more >
JavaScript - Bootstrap
DEFAULTS.keyboard = false // changes default for the modal plugin's ... In practice, this is used to enable dynamic HTML content to have...
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