Git Product home page Git Product logo

Comments (3)

fritz-c avatar fritz-c commented on August 17, 2024 1

You could create a CSS rule for the drag handle, something like:

.rst__moveHandle {
    display: none;
}

.rst__rowContents {
    border-left: 1px solid #bbb;
}

The above will hide the handle, making dragging impossible. An alternative would be to apply pointer-events: none; to the handle, but that would leave you with a UI that suggests you can drag stuff around even though you can't.

If you want to apply this to only a few nodes in the tree, I would recommend (>= v0.1.5) adding something like data-hide-handle: 'true' in generateNodeProps to nodes that fit the hiding conditions, and then a css selector to the css above (something like [data-hide-handle="true"] .rst__moveHandle {...).

from react-sortable-tree.

maurocolella avatar maurocolella commented on August 17, 2024

Ok, thank you. That is a workaround, but ideally, I would prefer to disable the dragging functionality entirely (and not attach the relevant event handlers).

Will consider for a future application. Right now, I feel too constrained in my possibilities.

from react-sortable-tree.

fritz-c avatar fritz-c commented on August 17, 2024

Ok, thank you for the feedback. I can see this being important to other people as well, so I'll keep it in mind for future releases.

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.