bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

Add API to highlight event (+ scroll into view) #9873

Open matsbryntse opened 1 month ago

matsbryntse commented 1 month ago

Refactor/simplify demo: http://lh/bryntum-suite/scheduler/examples/filtering/

onChange({ value }) {
                scheduler.eventStore.forEach(task => {
                    const taskClassList = new DomClassList(task.cls);

                    if (value !== '' && task.name.toLowerCase().includes(value.toLowerCase())) {
                        taskClassList.add('b-match');
                    }
                    else {
                        taskClassList.remove('b-match');
                    }

                    task.cls = taskClassList.value;
                });

                scheduler.element.classList[value.length > 0 ? 'add' : 'remove']('b-highlighting');
            }