minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.
MIT License
516 stars 69 forks source link

node.droppable children check #210

Closed gunheesssss closed 10 months ago

gunheesssss commented 10 months ago

node.droppable Is it possible to determine whether a parent has children or not?

https://github.com/minop1205/react-dnd-treeview/assets/126860189/d7d2967f-1429-4707-920d-c047443af2c1

I want to remove the arrow if there are no children. And is it possible to set a maximum depth? πŸ₯ΊπŸ₯Ί

minop1205 commented 10 months ago

@gunheesssss

See hasChild to see if a node has children.

https://github.com/minop1205/react-dnd-treeview#render-prop

2023-10-12_10h27_02

For the maximum depth, please refer to a similar Issue in the past.

https://github.com/minop1205/react-dnd-treeview/issues/127

gunheesssss commented 10 months ago

@minop1205 Wow thank you for the really quick reply πŸ™πŸ™‡πŸ»β€β™‚οΈ I should have looked better, I'm really sorry. 😭

Lastly, is there a search function?

minop1205 commented 10 months ago

@gunheesssss

Search API has been raised as another issue, but not yet addressed. https://github.com/minop1205/react-dnd-treeview/issues/198