marceljuenemann / angular-drag-and-drop-lists

Angular directives for sorting nested lists using the HTML5 Drag & Drop API
MIT License
2.16k stars 713 forks source link

Issue with dnd-allowed-types #493

Open ZtheLeader opened 5 years ago

ZtheLeader commented 5 years ago

I'm having a group structure where I have groups and questions. I can drag questions in group and drag groups and questions independently as well (for sorting). I DON'T want a group to be added in another group. (Groups should only contain questions.) I'm using dnd-allowed-types. I give it all the types which a groups should accept as:

 dnd-allowed-types = ['all-question-type-values']

It works fine expect it now disables the group now i.e now groups don't accept incoming groups but now I can't drag them elsewhere for sorting either.

I've gone through documentation extensively but cannot find the solution yet. Anybody can help me on that?

ppaul commented 4 years ago

since it's no longer maintained, you can do changes on your local file like this:

dndDragTypeWorkaround.dragType = attr.dndType && attr.dndType.toLowerCase();

instead of using angular.scope.$eval, which only works with an array, but returns undefined for a string property