You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?
I understand
Which connector are you using (React/Angular/etc)?
React
Bug Description
Issue: the layout of events spanning multiple days is corrupted on first render after updating events prop when custom event content is used. The layout is fixed on the next rerender.
To reproduce:
Click Switch button in the left top corner. This button updates events prop of FullCalendar with new events.
Check the events layout.
Click Force Rerender button.
Check the events layout again.
Expected: events are placed correctly immediately after click on Switch button, nothing changes after clicking Force Rerender
Actual: after click on Switch button, the second event is placed on top of the first event with 3px offset from the top. Only after Force Rerender click the events are placed correctly.
Observations:
Reproducible only with <React.StrictMode>.
Reproducible with events longer than 1 day (because absolute layout is not used for 1-day all-day events).
Reproducible only with custom event content (eventContent prop).
Screen.Recording.2023-06-29.at.1.38.45.PM.mov
The text was updated successfully, but these errors were encountered:
@w990752800 , thanks for the comment, but setting dayMaxEvents: true does not change the behavior, and also I need the calendar cells to extent to display all events at once, with this option, some events may be hidden.
I believe the issue is from using useState to reintialize the calendar when the state is changed. You can instead use the API to update events which should not have this issue:
In the real application that I have instead of useState I have react-query's useQuery to get the events. React-wise the code where I set what I get from useState/useQuery to the calendar's events is more natural and it works well in all other scenarios.
Reduced Test Case
https://stackblitz.com/edit/github-p6vnsq?file=src%2FDemoApp.jsx
Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?
Which connector are you using (React/Angular/etc)?
React
Bug Description
Issue: the layout of events spanning multiple days is corrupted on first render after updating
events
prop when custom event content is used. The layout is fixed on the next rerender.To reproduce:
Switch
button in the left top corner. This button updatesevents
prop of FullCalendar with new events.Force Rerender
button.Expected: events are placed correctly immediately after click on
Switch
button, nothing changes after clickingForce Rerender
Actual: after click on
Switch
button, the second event is placed on top of the first event with 3px offset from the top. Only afterForce Rerender
click the events are placed correctly.Observations:
<React.StrictMode>
.eventContent
prop).Screen.Recording.2023-06-29.at.1.38.45.PM.mov
The text was updated successfully, but these errors were encountered: