Extracting views into separate components

1 Answer 85 Views
Scheduler
Zhulien
Top achievements
Rank 1
Zhulien asked on 31 Oct 2022, 10:05 AM | edited on 31 Oct 2022, 10:07 AM

I am searching for a way to extract Scheduler views into separate components. Instead of:

<Scheduler>
    <DayView />
</Scheduler>

I want to be able to do:

<Scheduler>
    <CustomDayView props={<props>} /> // returns `DayView` as top-most element under the hood
</Scheduler>
This doesn't work. I've tried using `forwardRef` and passing the ref to the underlying `DayView` but that didn't work either. I can only get it working by using a method directly `{getDayView(props)}` but I want to avoid that. Also, I don't care much about the integrated view switcher as I am ditching it anyway and providing my own so that won't be a problem for the view name.

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 02 Nov 2022, 08:36 AM

Hello Zhulien,

I have to say that currently the Scheduler does not provide an option for passing custom component as a View and the only customizations that can be achieved are through the properties of the available Views:

Using the function or wrapping the entire Scheduler in the custom component and customize the available views conditionally are the only options with the current implementation.

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Scheduler
Asked by
Zhulien
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or