How to use drag and drop system in Lister Comp

I can be easy to use Drag n drop in Container Comp, but the lister doesn’t callback any result, specially onHoverStartGetAcceot() .

You are probably just missing the “draggable” setting. You can set a column up to be draggable in the lister column definition table. You can also set the draggable list attribute if you are using a raw listCOMP.

I will update the wiki to make this more clear!

yep, if you have updated the document please call me :>

I try to use TreeLister, but how to drag for theirs children like lister.

tree lister doesn’t allow drag to reorder rows, but you should be able to use drag-drop callbacks still. If you can’t please post an example.

OK, here you are :>
Question.tox (49.6 KB)

Sorry about the delay in response. Looking into this.

I can tell you that the onDrag callbacks aren’t working because the “draggable” row is set to false in the column definitions.

The hover callbacks do seem to have a bug. Researching this now.

I found the onHover/onDrop problem. Will be fixed in next release.

Workaround:

  • change lister/internalCallbacks to clone immune (lightning bolt button on the node)
  • change the name of the onHover function inside to onHoverOld. This function was being called instead of the new callback DAT function. Do the same for the onDrop function.
  • you may have to cut and paste the lister for the changes to take effect
1 Like