vue-popper icon indicating copy to clipboard operation
vue-popper copied to clipboard

allow to refresh the component

Open alfonsobries opened this issue 6 years ago β€’ 1 comments

For my current project, I'm updating some of the options dynamically, specifically the placement, but once I change the placement it's not being applied, so I think to add some method to re-render the component will be great.

Currently, my workaround is to add a key in the component and update that key to force the component to reload, but this is more like a patch, some kind of native method will be great.

<popper
    ref="popper"
    :key="rerenderKey"
...
/>
method () {
 refreshComponent() {
this.rerenderKey++;
}

alfonsobries avatar May 28 '19 02:05 alfonsobries

Does the updatePopper works?

https://github.com/RobinCK/vue-popper/blob/master/src/component/popper.js.vue#L358

I also noticed in your project that you are using click while it should be clickToToggle this way you can get rid of:

      if (this.closeOnDropdownClick && this.$refs.popper) {
        this.$refs.popper.doClose();
      }

theprobugmaker avatar Oct 22 '19 23:10 theprobugmaker