Repro Steps:
Just load events and resources with async pipe directly from Observable selector that takes state from NGXS store.
With drag and drop
Thanks
Re: [ANGULAR] Flickering when moving events in Scheduler
Posted: Tue Oct 12, 2021 8:53 am
by mats
Glad to see you found that config Can you please share the code you use to load new data into the event store, so we can investigate this?
Re: [ANGULAR] Flickering when moving events in Scheduler
Posted: Wed Oct 13, 2021 7:58 am
by sanid
I will use the order in which it is used any over simplify code in this example to explain flow of data and changes in the state.
1 Brnthum Scheduler component uses two observables for loading events and resources:
Drop event in main component makes rest call and after getting response from backend updates the store with new data.
scheduler.listeners = {
eventDrop: ({ source, eventRecords, isCopy, context }) => {
// do the rest call and update the event in the db, and than update the store
this.store.dispatch(new PatchSchedulerTaskAction(task));
}
}
My guess is that setting new state in the store is replacing complete array with new reference. Patching arrays ( partialy updating only one piece of it) is currently not supported.
Thanks guys
Re: [ANGULAR] Flickering when moving events in Scheduler
Posted: Thu Oct 14, 2021 2:11 pm
by saki
Unfortunately we do not have any demo that would use NGXS Store to which we could apply you code directly. Is there any chance to provide us with a complete runnable showcase that we can npm i && npm start, investigate and debug?