`*Content` slots do not support dynamically imported components
See original GitHub issueIf a Vue component passed to a FullCalendar slot is imported using a dynamic import, it’s not used by FullCalendar; instead, the fallback slot content is used if available, failing that nothing is displayed.
I have ran into this for the eventContent
and resourceLabelContent
slots, and I’d guess this might apply to all *Content
slots if they’re implemented the same way.
Vue supports dynamically imported components such that they will only be downloaded at the point of render.
Demo
Check out DemoApp.vue
here:
https://codesandbox.io/s/demo-dynamically-imported-slot-content-bug-cz244
Note:
FullCalendarResource
is imported statically and used by FullCalendar to render resourcesFullCalendarEvent
is imported dynamically and ignored by FullCalendar
Expected behaviour
The <full-calendar-event />
component placed within the eventContent
slot should be used to render calendar events.
Actual behaviour
Fallback slot content is used instead.
–
PS really enjoying that we can use slots now for resources and events, it’s such a nice DX improvement so thanks for adding that!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top GitHub Comments
thanks, I will look into this for the next release.
the changes in this PR might potentially solve the problem: https://github.com/fullcalendar/fullcalendar-vue/pull/123
Released in v6.0.0