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

Selected notes on mount returns 0 nodes #243

Open
buzzclue opened this issue Jan 7, 2022 · 1 comment
Open

Selected notes on mount returns 0 nodes #243

buzzclue opened this issue Jan 7, 2022 · 1 comment

Comments

@buzzclue
Copy link

buzzclue commented Jan 7, 2022

mounted() {
      console.log(this.$refs.vaults.selected())
      this.$nextTick(() => {
          console.log(this.$refs.vaults.selected())
      });
},

How to get the selected notes on mounted hook? Even the $nextTick returns 0 when there are selected item in tree data?

@buzzclue
Copy link
Author

buzzclue commented Jan 7, 2022

I found a workaround, in the mounted event of component I got the selected nodes.

this.$refs.vaults.$on("tree:mounted", (tree) => {
    console.log(this.$refs.vaults.selected())
});

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

1 participant