minop1205 / react-dnd-treeview

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

Prevent showing placeholder for current element's position while dragging #122

Closed ngocducdim closed 2 years ago

ngocducdim commented 2 years ago

Hi, I have a problem, when I re-order the element, the placeholder alway show the element's current position (you can see the video, when I drag to bottom direction, the placeholder is showing but that position is current element's position) I don't want this behavior, is there anyway to prevent this?

https://user-images.githubusercontent.com/97713182/175512250-475ed32e-316f-452d-8ea5-2e94091db7ed.mp4

minop1205 commented 2 years ago

@ngocducdim It is probably not possible with just the current parameters of the placeholderRender API. If we can add the hovered node ID to the parameter of the placeholderRender API, it would be possible to determine.

ngocducdim commented 2 years ago

Ok thank you for the reply