Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to refresh the component #95

Open
alfonsobries opened this issue May 28, 2019 · 1 comment
Open

allow to refresh the component #95

alfonsobries opened this issue May 28, 2019 · 1 comment

Comments

@alfonsobries
Copy link
Contributor

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++;
}
@theprobugmaker
Copy link

theprobugmaker commented Oct 22, 2019

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();
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants