-
Notifications
You must be signed in to change notification settings - Fork 350
Description
I'm figuring out "Fusion" by ducktaping an app that uses jquery fullcalendar. ( it's here: https://rdb.space/cal/ ) While it's not actual app that's supposed to do anything worth using, I've come up with a problem with subscribe returning the initial results.
Problem is, that fullcalendar uses a function to fetch the events for the calendar
this.eventSource = function(start, end, timezone, callback){
// can't currently use "between() type of functionality with fusion if you filter by Date object
//this.backEndCal.above({start: new Date(start)}).below({start: new Date(end)})
this.backEndCal.findAll({calendarId: "test"}).value().then(function(results){
console.log(results);
callback(results);
});
}
It was suggested to me, that I use the initial value from subscribe() to populate the calendar, but I don't want to do that, because fullcalendar is capable of lazy loading the events and I feel I wouldn't want to have the actual app load every event, just month or two.
What happens when I use the eventSource and subscribe() is, every event gets rendered twice:
If it's not possible to prevent getting the initial results from subscribe, I think it's at least not totally obvious that every initial result fires .onAdded()