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
};
Re: [REACT] One ResourceRecord But Multiple Resources
Posted: Wed Jun 09, 2021 11:00 am
by mats
Try to use
eventRecord.resources
Instead?
Re: [REACT] One ResourceRecord But Multiple Resources
Posted: Wed Jun 09, 2021 11:06 am
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.
Re: [REACT] One ResourceRecord But Multiple Resources
Posted: Wed Jun 09, 2021 11:11 am
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.