Code Monkey home page Code Monkey logo

Comments (4)

Dongbox avatar Dongbox commented on May 24, 2024

I changed his VueTree.vue and just replace the node.data._key with index that it can run for me.
In line 15:
... :key="index" ... >

from tree-chart.

wrkyle avatar wrkyle commented on May 24, 2024

@bifshteks When the VueTree component is created it runs a method called addUniqueKey which iterates through the dataset and assigns a UUID to each node, called _key. This _key is not only used as a unique key for the v-for but also as an identifier when drawing links with SVG and d3. When the dataset changes the draw method is called but addUniqueKey is not. If any new nodes have been added to the dataset they will not have a _key and the warning will be thrown. This may cause the card rendering error and d3 may not be able to identify the link to draw.

The most efficient solution might be to call addUniqueKey each time the dataset changes but modify it to check if each node already has a _key and not recreate it if it does. I might create a pull request for this a little later.

from tree-chart.

jackieha avatar jackieha commented on May 24, 2024

请问这个问题解决了吗? 急需该功能

from tree-chart.

Maxim-Durand avatar Maxim-Durand commented on May 24, 2024

This issue should've been fixed with 0eff2fd.

Please try to pull latest version and see if it's still an issue.

from tree-chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.