I'm trying to find a way how to disable dropping by using CDK due to some conditions.If the list which I wanna drop is empty should be disabled.I couldn't find a way to do that inside a method in .ts file.There are some HTML directives for that but not useful for me.
if(event.container.data.length==1){
event.previousContainer.disabled=true;
}
I found this .disabled method for dragged containers but it only works when I Drag.I need an event to drop.
https://stackblitz.com/edit/angular-ui7u9m?file=src/app/cdk-drag-drop-disabled-sorting-example.ts
In this stackblitz example,there are two lists for example when Avilable lists is empty(no elements in array),dropping shouldnt be allowed anymore to this list.Could you help me to do that?
Drag&Drop enter predicate
– Carsten