Hi Lorryl,
Good day to you,
We have validated your reported queries,
Query 1: “How to let the dropped data direct to the specific swimlane?”
If the Kanban with swimlaneSettings is enabled, will order the cards based on the keyfield assigned. You can achieve your requirement with the Drag and Drop, by changing the target to the particular swimlane element target instead of Kanban as target and update the card data based on the keyfield specified to place the card in specific swimlane. Check the below shared code blocks for reference.
|
onKanbanADragStop(args: DragEventArgs) {
let kanbanBElement: Element = <Element>closest(args.event.target as Element, '#KanbanB');
let kanbanBSwimElement = <Element>closest(args.event.target as Element, '.e-content-row');
if(this.swimlaneSettings.keyField && kanbanBSwimElement.previousElementSibling.getAttribute('data-key')) {
args.data[0][this.swimlaneSettings.keyField] = kanbanBSwimElement.previousElementSibling.getAttribute('data-key')
}
if (kanbanBElement || kanbanBSwimElement) {
this.kanbanObjA.deleteCard(args.data);
this.kanbanObjB.addCard(args.data, args.dropIndex);
args.cancel = true;
}
};
|
Query 2: “If I set the swimlaneSettings keyField is noneexistent field, and set showUnassignedRow is true. After I drag card "6" to Kanban B, it get below error.”
We have validated the reported issue and have considered the reported issue “Script error is raised with the drag & drop action, when swimlaneSettings keyField is a non-existent field” as a bug from our end. We will include the fix for the reported issue, with our May 11th patch release. We appreciate your patience until then.
Please get back to us if you face any difficulties,
Regards,
Indrajith