Hi,
You can bind the Kanban, handle its ‘change’ event and make updates to the original array or backend synchronization.
<smart-kanban id="kanban" editable></smart-kanban>
<div id="output">Task count: <span id="count">0</span></div>
<script>
const tasks = [
{ id: 1, label: 'Task 1', status: 'To Do', priority: 'High' },
{ id: 2, label: 'Task 2', status: 'In Progress', priority: 'Low' }
];
const kanban = document.getElementById('kanban');
kanban.dataSource = tasks;
kanban.columns = [
{ label: 'To Do', dataField: 'toDo' },
{ label: 'In Progress', dataField: 'inProgress' },
{ label: 'Done', dataField: 'done' }
];
// Two-way binding: Changes in UI update the array
kanban.addEventListener('change', (e) => {
});
Best regards,
Markov
Smart UI Team
https://www.htmlelements.com/