Giter VIP home page Giter VIP logo

Comments (6)

phphe avatar phphe commented on September 22, 2024

no

from he-tree.

andyjamesn avatar andyjamesn commented on September 22, 2024

Hmmmm, ok thanks.

Could this not be done somehow by having an event listener on the Draggable component?

from he-tree.

phphe avatar phphe commented on September 22, 2024

I can't understand. openNodeAndParents is a method.

from he-tree.

andyjamesn avatar andyjamesn commented on September 22, 2024

Yes, as with all methods the only way to call them is from within the component. Using $refs.treeRef.methodName

These work amazing in the component but as soon as you need to interact from outside the component context it becomes limiting.

So some way to access these methods would be a great addition no?

An event listener was just a thought to get this to work but probably not ideal. The thinking was when the event fires from outside the component it calls a method.

But any way that can call methods outside the component would make it so much more powerful!

BTW, thanks for all your help and hard work to make and share this plugin!

from he-tree.

phphe avatar phphe commented on September 22, 2024

Tree will create stat object for each node, and open state stored in stat (stat.open). So you must get tree instance to access stats.

from he-tree.

andyjamesn avatar andyjamesn commented on September 22, 2024

Well I solved this by using events. I have an event listener in the the component with my main tree. When the event is triggered outside the component the listener in the component which has access to the tree ref instance fires and does what I need.

from he-tree.

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.