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

[Feature Request] VTooltip Observe Content Mutations, recalc position/dimension #9878

Closed
gaby64 opened this issue Dec 4, 2019 · 1 comment
Assignees
Labels
C: VOverlay VOverlay C: VTooltip VTooltip T: enhancement Functionality that enhances existing features
Milestone

Comments

@gaby64
Copy link

gaby64 commented Dec 4, 2019

Problem to solve

changes in tooltip content does not reposition tooltip

couldnt test with vuetify fork, modified vuetify\lib\components\VTooltip\VTooltip.js in node_module

Proposed solution

data: () => ({
    calculatedMinWidth: 0,
    closeDependents: false,
    observer: {}
}),
methods: {
  activate() {
      // Update coordinates and dimensions of menu
      // and its activator
      this.updateDimensions(); // Start the transition
      requestAnimationFrame(this.startTransition);
      this.observer = new MutationObserver(mutations => this.updateDimensions());
      this.observer.observe(this.$refs.content, { attributes: false, childList: true, characterData: true, subtree: true });
    },

    deactivate() {
      this.observer.disconnect();
      this.runDelay('close');
    }

@ghost ghost added the S: triage label Dec 4, 2019
@gaby64 gaby64 changed the title [Feature Request] Observe Content Mutations, recalc position/dimension [Feature Request] VTooltip Observe Content Mutations, recalc position/dimension Dec 4, 2019
@johnleider
Copy link
Member

We have v-mutate now, maybe we can leverage it @KaelWD

@johnleider johnleider added C: VTooltip VTooltip T: feature A new feature and removed S: triage labels Jan 15, 2020
@KaelWD KaelWD added T: enhancement Functionality that enhances existing features and removed T: feature A new feature labels Aug 12, 2021
@KaelWD KaelWD added this to the v3.0.0 milestone Aug 12, 2021
@KaelWD KaelWD added the C: VOverlay VOverlay label Aug 13, 2021
KaelWD added a commit that referenced this issue Aug 16, 2021
@KaelWD KaelWD closed this as completed Aug 16, 2021
@johnleider johnleider added this to To do in Vuetify 3 - Titan via automation Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VOverlay VOverlay C: VTooltip VTooltip T: enhancement Functionality that enhances existing features
Projects
No open projects
Development

No branches or pull requests

3 participants