Page 1 of 1

[REACT] React Components in bryntum

Posted: Fri Jun 02, 2023 12:04 pm
by kovacd

Hello,

i would like to know, if it is possible to render a React Component inside the eventBodyTemplate?

so something like:

<BryntumSchedulerPro
eventBodyTemplate={(event: SchedulerEventModel) => <Fragment>...</Fragment>}
 />
 

Re: [REACT] React Components in bryntum

Posted: Fri Jun 02, 2023 12:15 pm
by alex.l

Hi,

You can use React components on the timeline but you need to use eventRenderer, not eventBodyTemplate.
https://bryntum.com/products/scheduler/docs/api/Scheduler/view/mixin/SchedulerEventRendering#config-eventRenderer

You can find a demo in examples-scheduler/frameworks/react/javascript/react-events folder in sources you downloaded from CustomerZone.
Online: https://bryntum.com/products/scheduler/examples/frameworks/react/javascript/react-events/build/


Re: [REACT] React Components in bryntum

Posted: Fri Jun 02, 2023 12:55 pm
by kovacd

It worked, but now i am facing this:

https://www.mediafire.com/file/9sp912procdh3gm/bryntum.webm/file

We are using Bryntum Scheduler Pro version 5.3.5


Re: [REACT] React Components in bryntum

Posted: Fri Jun 02, 2023 1:00 pm
by tasnim

Hi,

I'm not able to download the file. Could you please upload it here?


Re: [REACT] React Components in bryntum

Posted: Fri Jun 02, 2023 1:01 pm
by kovacd

Here you go!


Re: [REACT] React Components in bryntum

Posted: Fri Jun 02, 2023 2:03 pm
by alex.l

Please attach your code here. Try to apply required changes to the example I shared, so we will be able to debug that to help you out.