Strange behaviour on Client-Side Blazor
Hi,
After trying lots of samples from the documentation, I am getting a strange behaviour for the Dialog control in client-side blazor.
When the page initializes, the Dialog shows by default.
I have got around this for now by adding a handler to the OnCreated event to hide the dialog, but it still shows very briefly in a flicker.
I'm not sure if this is intended behaviour or not, or if I am missing some attribute or setting to prevent a dialog showing without being told specifically to do so.
I am trying the getting started samples on https://ej2.syncfusion.com/blazor/documentation/dialog/getting-started/
I am using .Net Core 3 Preview 7 & Syncfusion version 17.2.0.40 and client-side Blazor
Thanks
SIGN IN To post a reply.
2 Replies
PM
Pandiyaraj Muniyandi
Syncfusion Team
August 19, 2019 01:52 PM UTC
Hi Matthew,
Greetings from Syncfusion support.
Query 1: When the page initializes, the Dialog shows by default. I have got around this for now by adding a handler to the OnCreated event to hide the dialog.
We have a visible property in Dialog for hiding the dialog on initial component render in the application. We suggest you, set a visible property as false by binding value from code behind, because it two-way binding property.
Sample code:
|
<EjsButton @onClick="@OnClicked">Open Dialog</EjsButton>
<EjsDialog @ref="DialogObj" Width="250px" ShowCloseIcon="true" @bind-Visible="@DlgVisible">
<DialogTemplates>
<Header> <div>Dialog</div> </Header>
<Content> <div>This is a dialog with header</div></Content>
</DialogTemplates>
</EjsDialog>
@code {
EjsDialog DialogObj;
private bool DlgVisible = false;
private void OnClicked()
{
this.DialogObj.Show();
}
}
|
Query 2: I have got around this for now by adding a handler to the OnCreated event to hide the dialog, but it still shows very briefly in a flicker.
Whether you are facing dialog contents are visible in DOM for a few seconds, before dialog component render completely?
If yes, we currently have a similar issue from our end and working with high priority to overcome this component rendering delay and this fix will be included in the patch release which is expected by the end of August. You can track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link:
We have prepared sample for your reference, get it from below link
Regards,
Pandiyaraj M
PM
Pandiyaraj Muniyandi
Syncfusion Team
September 4, 2019 06:55 AM UTC
Hi Matthew,
Thanks for your patience.
We have resolved the “dialog component takes few seconds to render initially on page load” issue and the fix included in the patch release version 17.2.49-beta. Also, we have prepared sample for your reference, get it from below link
We suggest you, upgrade to the latest version to resolve this issue in your end.
Regards,
Pandiyaraj M
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
MA Matthew
- Aug 15, 2019 07:07 PM UTC
- Sep 4, 2019 06:55 AM UTC