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

Filtering timeAxis with Infinite scroll enabled and zoom in/out results in the error #9689

Open ghulamghousdev opened 2 months ago

ghulamghousdev commented 2 months ago

Forum post

For reproduction, go to the basic example of scheduler and apply the following config:

    infiniteScroll   : true,
    timeAxis         : {
        filters : [
            {
                filterBy(filterBy) {
                    return filterBy.startDate.getDay() !== 0;
                }
            }
        ]
    },

No try to zoom in/out and there is going to be an error in the console.

Uncaught TypeError: Cannot read properties of null (reading 'getTime')
    at DateHelper.add (DateHelper.js:1723:31)
    at Scheduler.calculateInfiniteScrollingDateRange (TimelineScroll.js:221:59)
    at Scheduler.shiftToDate (TimelineScroll.js:301:31)
    at TimeAxisViewModel.update (TimeAxis.js:620:27)
    at TimeAxisViewModel.trigger (Events.js:1543:44)
    at TimeAxisViewModel.update (TimeAxisViewModel.js:296:16)
    at TimeAxisViewModel.setTickSize (TimeAxisViewModel.js:581:14)
    at set tickSize (TimeAxisViewModel.js:575:14)
    at TimeAxisViewModel.set (Config.js:519:28)
    at TimeAxisViewModel.setConfig (Base.js:1075:25)

https://github.com/user-attachments/assets/55dd05f5-9d0e-4e07-8895-c03d1d870db1