Closed smingam closed 6 years ago
I think you are right, it's not a part of the codebase I use this too often. Could I ask you to test if I put a PR in for it?
Have you tried refetchEvents to fix your original issue?
Yes like I said, I have a timer that call this.$refs.calendar.$emit('refetch-events')
every 5 seconds to refresh the calendar, and it doesn't works after the first toggle (so even toggling back to fcEventComp
doesn't do anything too). Because of webpack & stuff, I'm having an hard time debugging that if...else...
for some reason I can't set a breakpoint on it, but looking directly into fullcalendar.js, I can see it looks like it's doing what it should be, which is puzzling. It just doesn't do an HTTP call anymore.
I've tested the removeEventSources in rebuild-sources
it works perfectly in my case.
(atm as a workaround, I just call this.$refs.calendar.fireMethod('removeEventSources')
in my toggle watcher and your eventSources watcher do the rest)
You want me to do a PR? I've never done one on github (!) but there is always a start :)
Sure, make a PR and I will review it, always happy to help anyone with their first PR 👍
Hello again ! I've noticed some, imho, wrong behavior when using a computed as
event-sources
Because rebuild-sources only remove events from the calendar instead of removing sources, every time the computed event-sources is triggered by a change, you end up with a cumulative display of all the sources since the first load. But that line is more than a year old, so I'm wondering what if I'm doing something wrong or if it's a bug.For the story, I'm trying to fix my source toggling that doesn't work anymore:
For some reason, it removes and add the new source, but doesn't fetch anything anymore (even with a setInterval that I use for 5sec refresh of the calendar). So I tried to use a computed property that depend on
availabilityMask
that now trigger therebuild-sources
in the watch, with the effect noticed above...Thanks for your support!