fullcalendar / fullcalendar-vue

The official Vue 3 component for FullCalendar
https://fullcalendar.io/docs/vue
MIT License
1.39k stars 89 forks source link

#eventContent slot is not reactive to props, data, or v-model bindings #141

Closed FeistyMango closed 1 year ago

FeistyMango commented 3 years ago

Problem

Any bindings defined within the #eventContent slot are not reactive. I observed this with v-model bindings, props, and data bindings. They do not react to changes to data that they are bound against. I've confirmed that if I move the problem code outside of the <FullCalendar />, reactivity will function as expected.

See a reproducible example here using props - https://codesandbox.io/s/sleepy-shamir-31jx1?file=/src/DemoApp.vue In this stripped-down example, state mutations of the data field isVisible are not observed within the eventContent slot. Notice that if you default the initial value to true, you will see it render properly though.

Related to

fullcalendar/fullcalendar#7083 fullcalendar/fullcalendar-vue#128

FeistyMango commented 3 years ago

I should note that if I change the event data intially passed into the <FullCalendar /> options prop, the watchers configured underneath will properly react and rerender the entire calendar. However, this has very limited usability for customizable content within the #eventContent slot and performance implications since the entire calendar is being re-rendered rather than the events that change.

maico910 commented 3 years ago

have any update about this? I want to use v5 for new features but I need to back to v4 about this issue

arshaw commented 1 year ago

This has been fixed in v6.0.0-beta.4

Updated repro: https://codesandbox.io/s/jovial-proskuriakova-h1ph1k?file=/package.json

@FeistyMango and @maico910, could you please confirm?

arshaw commented 1 year ago

Released in v6.0.0