React-sortable-tree: Is it possible to not open the children, when dragging over a parent?

Created on 11 Sep 2018  路  5Comments  路  Source: frontend-collective/react-sortable-tree

It can be a bit disorienting when dragging over multiple parents with a lot of children, and they all open to show their children. Is there a way to not open them, and rather highlight the parent node if we want to drop it in as a child ?

Most helpful comment

I'd also like a way to prevent auto-expanding. I've seen a good number of users get confused by this. If there was a way to turn it off then devs could manually add more advanced logic using the drag events, such as have a timeout so it pops open if hovered for more than a second.

All 5 comments

I'd also like a way to prevent auto-expanding. I've seen a good number of users get confused by this. If there was a way to turn it off then devs could manually add more advanced logic using the drag events, such as have a timeout so it pops open if hovered for more than a second.

Anyone have a work around for this?

Guys, did anyone find a solution to this problem?

+1

My workaround is to set children to an empty array if expanded is set to false. Seems to work just fine for me. This, of course, implies you're using your own function for generating the tree.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bigjujube picture bigjujube  路  4Comments

theonelucas picture theonelucas  路  3Comments

jorgecuesta picture jorgecuesta  路  4Comments

xmhscratch picture xmhscratch  路  5Comments

kaueDM picture kaueDM  路  3Comments