Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

130
Visualizações
Full Calendar Callbacks

I am working with Full Calendar with React.

This is my code

            <FullCalendar
                ref={calendarRef}
                editable={true}
                headerToolbar={{ start: '', center: '', end: '' }}
                plugins={[timeGridPlugin, interaction]}
                initialView="timeGridWeek"
                selectable={true}
                select={onDateSelect}
                eventDrop={onEventDrop}
                eventResize={onEventResize}
                eventContent={(args) => renderEventContent(args)}
                allDaySlot={false}
                events={events}
            />

And I have 2 callbacks eventDrop and eventResize

    const onEventDrop = (event) => {
    const slot = { ...event.event._def.extendedProps };
    const delta = event.delta;
    slot.date = new Date(slot.date);
    slot.date.setHours(0, 0, 0, 0)
    slot.date.setDate(slot.date.getDate() + delta.days)
    slot.startTime += (delta.milliseconds / 1000)
    slot.endTime += (delta.milliseconds / 1000)
    updateSlot(id, slot.id, slot).then(() => {
        loadSlots()
    }).catch(() => {
        event.revert()
    })
}

const onEventResize = (event) => {
    const slot = { ...event.event._def.extendedProps };
    slot.startTime += (event.startDelta.milliseconds / 1000)
    slot.endTime += (event.endDelta.milliseconds / 1000)
    updateSlot(id, slot.id, slot).then(() => {
        loadSlots()
    }).catch(() => {
        event.revert()
    })
}

for some reason the events aren't called always, the event itself gets dragger and resized and its reflected to the view But the callback isn't triggered I couldn't find the exact time when its not called, but it works sometimes then it stops I tried a different event and it works, then it stops, its mostly random

Is there any reported bug about this issue, or do I have an issue in the code?

Regards,

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda