Closed pmiklashevych closed 7 months ago
https://www.bryntum.com/forum/viewtopic.php?p=80936#p80936
Scheduler/examples/basic/app.js
const scheduler = new Scheduler({ appendTo : 'container', minHeight : '20em', project : { resourcesData : [], eventsData : [] }, startDate : new Date(2017, 0, 1, 6), endDate : new Date(2017, 0, 1, 20), viewPreset : 'hourAndDay', rowHeight : 50, barMargin : 5, multiEventSelect : true, columns : [ { text : 'Name', field : 'name', width : 130 } ], tbar : { items : [ { type : 'button', text : 'Load data', listeners : { click : 'up.onDataLoad' } } ] }, onDataLoad() { // comment out suspendRefresh/resumeRefresh to see that loading works scheduler.suspendRefresh(); scheduler.project.loadInlineData({ resourcesData : resources, eventsData : events }).then(() => { scheduler.resumeRefresh(true); }); } });
Go to http://lh/bryntum-suite/scheduler/examples/basic/ Click "Load data" button See nothing is shown in the scheduler => Check values in console:
scheduler.refreshSuspended //0 scheduler.project.eventStore.count //8 scheduler.project.resourceStore.count //10
See data is in the store, refresh is not suspended.
It works when remove suspendRefresh/resumeRefresh
onDataLoad() { //scheduler.suspendRefresh(); scheduler.project.loadInlineData({ resourcesData : resources, eventsData : events }).then(() => { //scheduler.resumeRefresh(true); }); }
or when suspendRefresh/resumeRefresh is there and current data is present
const scheduler = new Scheduler({ appendTo : 'container', minHeight : '20em', project : { resourcesData : [{ id : 'r1', name : 'Mike' }], eventsData : [{ id : 1, resourceId : 'r1', startDate : new Date(2017, 0, 1, 10), endDate : new Date(2017, 0, 1, 12), name : 'Click me', iconCls : 'b-fa b-fa-mouse-pointer' }] },
Note, suspendRefresh is needed when restore scroll position to avoid flickering: https://github.com/bryntum/support/issues/2122
not reproducible
https://www.bryntum.com/forum/viewtopic.php?p=80936#p80936
Scheduler/examples/basic/app.js
Go to http://lh/bryntum-suite/scheduler/examples/basic/ Click "Load data" button See nothing is shown in the scheduler => Check values in console:
See data is in the store, refresh is not suspended.
It works when remove suspendRefresh/resumeRefresh
or when suspendRefresh/resumeRefresh is there and current data is present
Note, suspendRefresh is needed when restore scroll position to avoid flickering: https://github.com/bryntum/support/issues/2122