Hi,
I have a “extendDefaultEvent” method that is adding properties to the new event, as far as I understood it’s not really adding the event on this part, but only on the “onEventCreated”, and I want to add the event based on a criteria, so on the “extendDefaultEvent” I have the condition - and if it’s true than it returns the event object along with the new properties, otherwise I see it returns the default new event object that is build in… but what happens is that it shows the new event like you can see in the screenshot I attached, and it is only disappears after refreshing the page, so how can I prevent the event from adding the default event to the dom?
this is my extendDefaultEvent -
const myDefaultEvent= useCallback((args) => {
const shift = findClosestShift(args.resource, args.start);
if (shift != undefined) {
return {
start: shift.start,
end: shift.end,
shiftId: shift.id,
resource: args.resource
};
}
},
[findClosestShift]
);