Our pure JavaScript Scheduler component


Post by frederick45 »

Hi,

my code on drop :

                                this.UnplannedGrid.store.remove(task);
                                task.startDate = date;
                                task.assign(resource);
                                this.scheduler.eventStore.add(task);

i have an error :
scheduler_component.js:1 Uncaught (in promise) TypeError: n.assign is not a function
at x.drop (scheduler_component.js:1:5059)
at DragHelper.trigger (scheduler.lwc.module.js:6207:29)
at DragHelper.finishTranslateDrag (scheduler.lwc.module.js:18396:24)
at DragHelper.onMouseUp (scheduler.lwc.module.js:19418:18)
at Proxy.handler (scheduler.lwc.module.js:12781:76)
at HTMLDivElement.o (aura_prod.js:64:58288)
at HTMLDivElement.t (aura_prod.js:1:14642)


Post by alex.l »

task.assign(resource);

Does your UnplannedGrid contain instances of EventModel class? Simple model doesn't have assign method.

All the best,
Alex


Post by frederick45 »

'Does your UnplannedGrid contain instances of EventModel class?'
how i do it ?


Post by frederick45 »

i found the solution
thank you


Post Reply