Our powerful JS Calendar component


Post by joversdev »

Hi,

When using the eventRenderer, there only seems to be one resourceRecord passed to an event even when there are multiple resources assigned to an event. Unless I am missing something, which is entirely possible, it would be nice to have all the resources for an event passed in so I can use that in my rendering.

const eventRenderer = ({ eventRecord, resourceRecord, renderData }: any) => {
    console.log({ event: eventRecord, resource: resourceRecord, render: renderData });
    // Seems to only ever pass one resourceRecord regardless
  };

https://bryntum.com/docs/calendar/#Scheduler/model/EventModel#property-resources


Post by mats »

Try to use

eventRecord.resources

Instead?

Tired of debugging javascript errors in web applications? Try our powerful error logging service RootCause


Post by joversdev »

... Oh, but that's too easy!

Thank you, that works.

I honestly didn't realize that was there. I've spent a lot of time pouring over the API docs for the past month but sometimes I can't find what I'm looking for.


Post by mats »

API is quite big yes, we’ll try to improve eventRenderer docs based on your feedback. Please keep on telling us what is poorly documented.

Tired of debugging javascript errors in web applications? Try our powerful error logging service RootCause


Post Reply