Giter Site home page Giter Site logo

Comments (4)

alexcurtis avatar alexcurtis commented on July 19, 2024 1

@gbmhunter. I have published 1.0.11. This supports multiple root level nodes. You just need to pass your data in as an array -- rather than an object. I'll update the README to show this to.

from react-treebeard.

alexcurtis avatar alexcurtis commented on July 19, 2024

Yes. It can't do that at the moment. I will experiment with this today. My only concern is that with multiple siblings at the root -- its no longer a tree structure. But maybe that is ok, and only a use-case.

from react-treebeard.

gbmhunter avatar gbmhunter commented on July 19, 2024

Thanks! I think there could be many potential use cases. Just thinking of a common one, say displaying folders/files on a computer, e.g. "My Computer" on Windows, displays multiple siblings, e.g. "C:", "D:", e.t.c in the same window.

My use case is I'm displaying various categories (and sub-categories) of engineering calculators to the user. I want them to be able to click on a category (or sub-category) which will then filter the calculator results. It makes no sense for me to have a root level "Categories" folder, which is just extra and redundant information.

BTW, top job with this code, I am very impressed!

from react-treebeard.

gbmhunter avatar gbmhunter commented on July 19, 2024

@alexcurtis , I will try it out soon...thank you so much!

from react-treebeard.

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.