Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #113185
    emily.thorne91
    Participant

    How do I handle two-way binding with Smart Kanban? Can web forms be used for Kanban data?

    #113196
    Markov
    Keymaster

    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/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.