Git Product home page Git Product logo

Comments (11)

fritz-c avatar fritz-c commented on July 18, 2024 1

@cocodrino One issue you might run into is that the rows are fixed-height. If you're considering using images, I think that would cause problems for you. However, if that's not an issue, I believe this library would serve as a good base for what you want to do.

To get a better idea for yourself, try out the demo and check out the demo code.

from react-sortable-tree.

cpunion avatar cpunion commented on July 18, 2024

Need too.

from react-sortable-tree.

fritz-c avatar fritz-c commented on July 18, 2024

I don't quite understand your question. Do you want to

  1. Create a tree based on an array of nodes?
  2. Add nodes to an existing tree from an array?
  3. Do drag-and-drop actions that duplicate your nodes sometimes? (Your example tree has two each of item1 and item2)

from react-sortable-tree.

cocodrino avatar cocodrino commented on July 18, 2024

hi @fritz-c basically I need have a list (array of nodes) then could drag and build a tree, don't care about if repeat some nodes, imagine an html tag list and build an html document tree drag and drop elements, so yes, you can have several img or p elements

from react-sortable-tree.

cpunion avatar cpunion commented on July 18, 2024

I need drag a component from the component list panel into the DOM tree panel to add the component to DOM tree. When the component is dragging, it likes a tree node that can move in tree, but when drop it out of the DOM tree, don't add it (remove it).

I guess @cocodrino same as me, item1 ... item4 are the components, drag them into the tree can build the tree.

from react-sortable-tree.

cpunion avatar cpunion commented on July 18, 2024

@fritz-c And how to duplicate node by dragging? (maybe need press a modifier key)

from react-sortable-tree.

fritz-c avatar fritz-c commented on July 18, 2024

@cpunion Tree-to-tree dragging is not possible at this time (see #29). As for duplicating, there are no convenience functions to do it, but you could potentially implement it yourself by modifying the treeData in the onMoveNode callback prop.

from react-sortable-tree.

cpunion avatar cpunion commented on July 18, 2024

@fritz-c For experience, I think it can't use in my project. I need a experience likes #64.

Tree is very complex, no more good alternates. This library is already good enough, thanks again. :-)

from react-sortable-tree.

fritz-c avatar fritz-c commented on July 18, 2024

I think I understand the motive of this question better now. If you want to drag an element in from another list, you can do something like this example:
https://fritz-c.github.io/react-sortable-tree/storybook/?selectedKind=Advanced&selectedStory=Drag%20from%20external%20source&full=0&down=1&left=1&panelRight=0&downPanel=storybook%2Fnotes%2Fpanel

If you want to drag from one tree to another, check out this example:
https://fritz-c.github.io/react-sortable-tree/storybook/?selectedKind=Advanced&selectedStory=Tree-to-tree%20dragging&full=0&down=1&left=1&panelRight=0&downPanel=storybook%2Fnotes%2Fpanel

from react-sortable-tree.

bhupendrarawat1973 avatar bhupendrarawat1973 commented on July 18, 2024

@fritz-c - How we can we deploy the same components on O365 tenant ?

from react-sortable-tree.

nmartinezb3 avatar nmartinezb3 commented on July 18, 2024

@fritz-c could you please provide a new link with the example of dragging an element in from another list?

Thanks

from react-sortable-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.