You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im using the following add/remove handlers without removing the task from the list
functionlistOnAdd(event: SortableEvent): void{consttaskId=event.item.getAttribute('task-id');if(typeoftaskId!=='string')thrownewError('Invalid Task Id!');event.item.remove();taskList.value.push({id: taskId});}functionlistOnRemove(event: SortableEvent): void{consttaskId=event.item.getAttribute('task-id');if(typeoftaskId!=='string')thrownewError('Invalid Task Id!');consttaskIndex=taskList.value.findIndex(i=>i.id===taskId);if(taskIndex===-1)thrownewError('Task not found!');taskList.value[taskIndex]={id: taskId,removed: true};// only mark them as 'removed'// taskList.value.splice(taskIndex, 1);}functionlistOnReset(){taskList.value=[...baseTasks];}
Hi! Im not very familiar with sortablejs
Im using the following add/remove handlers without removing the task from the list
The elements that are moved between categories, when reset, dont seem to be added again.
https://stackblitz.com/edit/recursive-template-refs-5ip6ao?file=src%2Fcomponents%2FTaskList.vue
Is this correct behaviour? I'm a bit surprised that the elements are not behaving as a clone list
The text was updated successfully, but these errors were encountered: