MedSpec wrote a comment+100 XP
3mos ago
i added this "gem"
<flux:kanban.column.cards
wire:sort="sortTask"
wire:sort:group="tasks"
data-status="{{ $status->value }}"
wire:sort:config="{
onSort: () => {},
onAdd: (e) => {
const newStatus = e.to.dataset.status;
const taskId = e.item._x_sort_key;
const position = e.newIndex;
$wire.sortTask(taskId, position, newStatus);
},
onUpdate: (e) => {
const taskId = e.item._x_sort_key;
const position = e.newIndex;
$wire.sortTask(taskId, position);
}
}"
>