Reputation: 487
I want to call another function , fetchData() , within my eventReceive function, but I keep getting fetchData() is not defined or _this.fetchData() is not function
<FullCalendar
defaultView="dayGridMonth"
header={{
left: "prev,next today",
center: "title",
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek"
}}
editable={true}
droppable={true}
plugins={[dayGridPlugin, interactionPlugin]}
events={testSubtask[0] ? testSubtask[0].map(d => ({
"id": d.id,
"title": d.name,
"start": d.start,
"end": d.end
})) : null}
eventReceive={function (info ) {
this.fetchDraggingTask(); //HOW TO CALL DIFFERENT FUNCTION HERE?
}}
/>
Upvotes: 1
Views: 680
Reputation: 871
I have been working around with fullcalendar lately. I think this way might work out.
<FullCalendar
defaultView="dayGridMonth"
header={{
left: "prev,next today",
center: "title",
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek"
}}
editable={true}
droppable={true}
plugins={[dayGridPlugin, interactionPlugin]}
events={testSubtask[0] ? testSubtask[0].map(d => ({
"id": d.id,
"title": d.name,
"start": d.start,
"end": d.end
})) : null}
eventReceive={(info) => this.fetchDraggingTask(info)}
/>
Upvotes: 2