ng-sortable trouble with data table widget

johnnyjava
Kilo Guru

I'm working on using drag and drop to re-order Release Tasks. I've cloned the Data Table widget to include ng-sortable. So far I have drag working, but the drop isn't working. I get a placeholder and no errors in my console log. Are there any angular wizards who can assist with this?

When any tr element is used as drag handle, the row appears to follow the mouse, but there's no drop shadow appearing. When I release the element, it falls back to where it came from.

drag but no drop.png

I'm attaching the widget with the ng-sortable dependencies with special thanks to ServiceNow Share item for Widget to Update Set UI Action.

I had to manually add some Order values to some of my rm_task records. Here are the widget instance properties:

sortable data table settings.PNG

1 ACCEPTED SOLUTION

It is! I was able to get it all working with some help from my A-Team.



I explain the solution we came up with here https://www.acorio.com/ui-sortable-servicenow-jakarta-widgets/


View solution in original post

8 REPLIES 8

johnnyjava
Kilo Guru

I was able to get this working by inspecting sources on Visual Task Boards and then creating a Widget Dependency to include /scripts/sn.dragdrop/ng_jqdnd_includes.js


sach1
Tera Guru

It is! I was able to get it all working with some help from my A-Team.



I explain the solution we came up with here https://www.acorio.com/ui-sortable-servicenow-jakarta-widgets/


nikhil2810
Tera Contributor

Hi John,

I'm trying to replicate same in kingston but I'm not finding sn.dragdrop in my page or vtb's source code can you please help me with it.

 

Regards,

Nikhil Gadodiya