Hi everyone,
I use Timeline view but kindly let me consult with you for having an issue on my end.
https://docs.dhtmlx.com/scheduler/timeline_view.html
I’d like to reload the latest data from database when each button of Today, Previous(arrow) and Next(arrow) were clicked.
onViewChange Event fires after one of those buttons were clicked.
However, the reload method inside onViewChange Event is endlessly called if I added the reload method to call the get api and set its latest data on the timeline view there.
https://docs.dhtmlx.com/scheduler/api__scheduler_onviewchange_event.html
Are there any suitable events at the time those buttons were clicked?
▼Currently it’s like as below
Frontend :
scheduler1.attachEvent("onViewChange", async (new_mode , new_date) => {
if(new_date !== viewBaseDate) {
await reloadReservation(new_Date, ...) // call get api inside
}
});
Thank you for your support as always.
meicom