Use calendar.refetchEvents() instead of calling calendar.destory() and buildCalendars() on ajaxComplete()

Created on 8 February 2024, about 1 year ago

Problem/Motivation

Currently on ajaxComplete() we call calendar.destory() and buildCalendars(). This gets rid of the FullCalendar instances completely. While this is a safe way to completely rebuild all calendars and fetch all data fresh, this also leads to a few disadvantages:

  • The state of FullCalendar is lost. For example in case the user navigated to a specific date, that state is lost and FullCalendar jumps back to the setting of the view.
  • Everything needs to be rebuilt which is slow.
  • The complete DOM of FullCalendar is being removed which leads to quite bad UX.

We could call calendar.refetchEvents() instead to fetch new data. That solves all the above issues.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

Version

1.1

Component

Code

Created by

🇨🇭Switzerland luksak

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024