fullcalendar icon indicating copy to clipboard operation
fullcalendar copied to clipboard

`event.getResources()` in `eventsSet` sometimes returns `null` on init

Open juangdhangrai opened this issue 2 years ago • 2 comments

Reduced Test Case

https://stackblitz.com/edit/github-4jubxm?file=src%2FDemoApp.vue

Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?

  • [X] I understand

Which connector are you using (React/Angular/etc)?

Vue

Bug Description

    eventsSet: this.handleEvents,
    resources: 'https://fullcalendar.io/api/demo-feeds/resources.json?with-nesting&with-colors',
    events: 'https://fullcalendar.io/api/demo-feeds/events.json?single-day&for-resource-timeline',

function handleEvents(events :EventApi[]) { events.forEach((event:any) => { console.log('handleEvents event.resourceId', event.getResources()) }) 1708782582161_d refresh chrome may have different result, sometime null ,occasion has value

juangdhangrai avatar Feb 24 '24 13:02 juangdhangrai

Thanks, confirmed.

I can see when pressing the "refresh" (reload preview) button on your demo, sometimes getResources() is returning null event though the events still appear in the resources.

I wasn't able to replicate this in the vanilla version so it seems specific to the Vue component.

https://codepen.io/acerix/pen/BaENdBe?editors=0011

acerix avatar Mar 04 '24 23:03 acerix