Code Monkey home page Code Monkey logo

Comments (6)

justinchmura avatar justinchmura commented on August 16, 2024

Hi Mark, I'd be more than happy to add that in. It's probably something I can get in over the weekend if that works for you.

from js-treeview.

blitz-research avatar blitz-research commented on August 16, 2024

Yes please!

Also, re: my twitter request for 'node in the callback', I had a poke around and eventually (I suck at JS) found the 'args' object that is sent to callbacks so I can use that, but you might want to doc it!

from js-treeview.

justinchmura avatar justinchmura commented on August 16, 2024

Oh I just replied. Guess I should have read this :P the docs can definitely be improved, I agree.

from js-treeview.

justinchmura avatar justinchmura commented on August 16, 2024

29c7514

I published version 1.1.1 that includes a collapseAll and expandAll methods. That should get you some of the way there. I'm currently also adding a way to specify that on initialization.

from js-treeview.

blitz-research avatar blitz-research commented on August 16, 2024

Cool, thanks!

I managed to get the treeview to start collapsed by adding this to render after the end of the 'add children' loop:

        children.classList.add('hidden');
        expando.textContent = '+';

from js-treeview.

justinchmura avatar justinchmura commented on August 16, 2024

1.1.2 now includes the option to specify the expanded option on a data node. It will now default to collapsed unless specified through the data. Figured that was a better default anyways.

Also, in the event you have this repo forked, I would suggest reforking it. I accidentally did some operations on it that was meant for a different project and it screwed the whole thing up. I had to restart the history.

from js-treeview.

Related Issues (6)

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.