Doubling up of predefined dialog

I have a a predefined dialog as follows:

await DialogService.AlertAsync("Polygon saved to map. To save map to database you need to save record", "Mapping Info", new DialogOptions { AllowDragging = true });


Everything is set up as required in program.cs.  I am using version 27.2.2.


This line of code seems to generate TWO instances of the dialog.  The AllowDragging option was set so I could sperate the two instances which open on top of each other.

Image_5248_1735838213428


Many thanks


3 Replies

UD UdhayaKumar Duraisamy Syncfusion Team January 3, 2025 08:28 AM UTC

The issue you are encountering, where two instances of the predefined dialog are being displayed, is likely caused by referencing <Syncfusion.Blazor.Popups.SfDialogProvider /> multiple times in your application. If this component is included more than once in your MainLayout.razor page, it will create multiple dialog instances.


To resolve this issue, ensure that <Syncfusion.Blazor.Popups.SfDialogProvider /> is referenced only once in the MainLayout.razor page. This will prevent duplicate instances of the dialog from being created.


For further details on using predefined dialogs with Syncfusion Blazor components, please refer to the following documentation:



MA Martin January 3, 2025 08:58 AM UTC

That fixed it.   Well analysed:-)



KG Kalpana Ganesan Syncfusion Team January 6, 2025 05:00 AM UTC

Hi Martin,


You are welcome. Please get back to us for further assistance.


Regards,

Kalpana.


Loader.
Up arrow icon