You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your question and description of the problem goes here
Hi!
I have a React-Redux application and I want to integrate the "gantt-schedule-timeline-calendar" into it. Can you please advise me on the best way to manage the calendar's state using Redux? Specifically, I am interested in how to set the initial state of the calendar, update it based on changes in Redux data, and dispatch actions in response to user interactions.
Thank you for your help.
The text was updated successfully, but these errors were encountered:
If you need you can listen state changes directly.
For example when user is scrolling through a timeline you can listen scroll position changes or time changes.
// Generate GSTC state from configuration objectconststate=GSTC.api.stateFromConfig(config);// for testingglobalThis.state=state;constelement=document.getElementById('gstc');//@ts-ignoreelement.addEventListener('gstc-loaded',(ev)=>{// @ts-ignoreglobalThis.dispatchEvent(newEvent('gstc-loaded',ev.target));});// Mount the componentconstapp=(globalThis.gstc=GSTC({// @ts-ignore
element,
state,}));// subscribe horizontal scrollconstusubscribeHorizontalScroll=state.subscribe('config.scroll.horizontal',horizontalScroll=>{console.log(horizontalScroll);// dispatch event to your redux store here if you need});// subscribe time changesconstunsubscribeChartTime=state.subscribe('config.chart.time',chartTime=>{console.log(chartTime);// dispatch event to your redux store here if you need});
Your question and description of the problem goes here
Hi!
I have a React-Redux application and I want to integrate the "gantt-schedule-timeline-calendar" into it. Can you please advise me on the best way to manage the calendar's state using Redux? Specifically, I am interested in how to set the initial state of the calendar, update it based on changes in Redux data, and dispatch actions in response to user interactions.
Thank you for your help.
The text was updated successfully, but these errors were encountered: