Giter Site home page Giter Site logo

phphe / he-tree-react Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 975 KB

React draggable sortable tree component.

Home Page: https://he-tree-react.phphe.com

License: MIT License

JavaScript 0.44% HTML 0.37% TypeScript 99.19%
draggable-tree react-component react-draggable sortable-tree

he-tree-react's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thewei

he-tree-react's Issues

Cannot drag root node into another root node when openIds is being used

Hi, i'm using he-tree-react with datatype:'tree' and an array of openIds in useHeTree options. However I noticed the different between with and without openIds

  • With openIds being used, it seems like I cannot drop a root level node into another root level node
Screen.Recording.2024-04-01.at.16.52.25.mov
  • Without openIds, I can do that easily
Screen.Recording.2024-04-01.at.16.51.34.mov

My expectation is I can drag root level node into another root level node, with or without openIds.

Support check droppable based on source and destination nodes data

Hi, i'm using he-tree-react to support dragging and dropping in tree.
However, from my business, there are some restriction about if source nodes are draggable into/next to droppable nodes. For example, a destination node cannot have more than 2 child levels (including the source node if dropped to it).
Can you support checking if a source node can drop to destination node, based on their two's data? I assume that function will have prototype like (sourceNode, destinationNode) => boolean

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.