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

Multiple foldingTransition warnings #42

Open
AndreasNasman opened this issue Jan 8, 2021 · 2 comments
Open

Multiple foldingTransition warnings #42

AndreasNasman opened this issue Jan 8, 2021 · 2 comments

Comments

@AndreasNasman
Copy link

Adding a Tree with v-slot results in multiple foldingTransition warnings. Is this the correct way to customize how the tree is displayed with Vue 3?
https://he-tree-vue.phphe.com/guide.html#custom-display-through-default-slot
image

Here's a minimal implementation of the problem, adding the Tree to a HelloWorld component built with the Vue Cli:

<template>
  <Tree :value="treeData" v-slot="{ node, index, path, tree }">
    <span>
      <b>{{ index }}</b>
      Title: {{ node.title }} - path: <i>{{ path.join(",") }}</i>
    </span>
  </Tree>
  ...
</template>

<script>
import { Tree } from "he-tree-vue";

export default {
  ...
  components: { Tree },
  data() {
    return {
      treeData: [
        { title: "node 1" },
        { title: "node 2", children: [{ title: "node 2-1" }] },
      ],
    };
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
...
</style>
@phphe
Copy link
Owner

phphe commented Jan 9, 2021

foldingTransition belongs to fold plugin. You can mixin fold plugin in your use.

@AndreasNasman
Copy link
Author

How come the warnings show up even though I'm not using the plugin? I don't intend to either. Shouldn't the warnings be suppressed by default, i.e. not using the plugin?

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