Dialog inside custom component issue w/ sample

Hi there - When opening a dialog inside a custom component, the dialog briefly renders at the top of the browser at 100%, then displays as normal. This is related to a previous thread I posted about a flickering dialog.

IMPORTANT: You'll have to open/close the dialog a few times and focus your attention near the top of the browser to see it. And it doesn't seem to happen on first open.

Sample attached.


Attachment: SfDialog_Render2048444139_58256f35.zip

3 Replies 1 reply marked as answer

BS Buvana Sathasivam Syncfusion Team April 11, 2022 12:09 PM UTC

Hi Gordon,


Greetings from Syncfusion support.


We suggest setting the AllowPrerender property set to true, which maintains the position whenever you open and close the dialog. Because it will maintain the dialog element in the DOM.


<SfDialog AllowPrerender="true">

</SfDialog>


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfDialog_Render2048444139-1441229885


By default, the AllowPrerender property is set as false, and dialog elements are destroyed and re-rendered each time you open and close the dialog. To solve your problem, you can set the AllowPrerender property to true.

API link: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Popups.SfDialog.html#Syncfusion_Blazor_Popups_SfDialog_AllowPrerender


Documentation: https://blazor.syncfusion.com/documentation/dialog/getting-started#prerender-the-dialog


Regards,

Buvana S


Marked as answer

GO Gordon April 11, 2022 03:03 PM UTC

That did the trick, thank you!



BS Buvana Sathasivam Syncfusion Team April 12, 2022 04:24 PM UTC

We are glad that your reported issues are resolved. Please get back to us if you need any further assistance.


Loader.
Up arrow icon