question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`*Content` slots do not support dynamically imported components

See original GitHub issue

If 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 resources
  • FullCalendarEvent 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
arshawcommented, Sep 21, 2020

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

0reactions
arshawcommented, Dec 15, 2022

Released in v6.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

My dynamic component (layout) doesn't work with named slots ...
Show activity on this post. I have problems to combine dynamic generated layouts with named slots. 'v-slot' directive must be owned by a...
Read more >
Using templates and slots - Web Components | MDN
Slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup...
Read more >
Slots - Vue.js
Slot content is not just limited to text. It can be any valid template content. For example, we can pass in multiple elements,...
Read more >
Introducing Component Slots for Figma-to-React code in ...
Component Slots allow you to pass React components or any JSX elements as ... and you can pass static or dynamically generated content....
Read more >
Phoenix.Component — Phoenix LiveView v0.18.3 - HexDocs
Function components can also accept blocks of HEEx content (more on this later): ... If the values rendered in the slot need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found