SchedulerForm Component: Use Window instead of Dialog

1 Answer 97 Views
Scheduler
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Bernd asked on 13 Jul 2022, 11:35 AM

Hi.

The SchedulerForm component offers a parameter "dialog" to assign a Dialog component for customization of the form dialog to edit events.

Is there any way to assign a Window component instead? If I try to replace the Dialog component with a Window component, the form is not being displayed as I of course can't assign the dialog props to the Window component.

Thanks!

Greetings,

Bernd

1 Answer, 1 is accepted

Sort by
1
Accepted
Filip
Telerik team
answered on 15 Jul 2022, 08:38 AM

Hello, Bernd,

It is possible to assign the Window component as well, or any other custom component, I made a small example that showcases this approach here:

https://stackblitz.com/edit/react-rkv1j2?file=index.js


I hope this helps.

Regards, FilipProgress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
commented on 15 Jul 2022, 09:15 AM

Hi.

That works, but one more question. I'm using Typescript so I had to cast the props of the CustomFormDialog component to any, which is not really cool. I tried to use the WindowProps instead but that showed me an error in the FormWithCustomDialog component because the dialog attribute of the SchedulerForm doesn't seem to work well together with the WindowProps. Any idea how to solve this?

Thanks!

Greetings,

Bernd

Filip
Telerik team
commented on 19 Jul 2022, 07:59 AM

Hi, Bernd,

I am glad to hear that the solution worked.

Using the CustomFormDialog props should work, can you show an example so that I can inspect it further?

Regards,

Filip

Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
commented on 19 Jul 2022, 02:29 PM

Hi Filip.

I tried again and for whatever reason it seems to work now. Maybe it was because I still was on the old version or so. I just upgraded to 5.5 now so there shouldn't be an issue anymore.

Thanks,

Greetings,

Bernd

Tags
Scheduler
Asked by
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Answers by
Filip
Telerik team
Share this question
or