Dialog: Can’t use both “Show” method and “Visible” property?

Hi,

I think a colleague of mine find a bug with dialog visible property.

He did the following actions:

  • Show a dialog using “Show” method.

  • Hide the dialog using (bind) “Visible” property.

The dialogs shows correctly but it doesn’t hide.

I attached an example component. Clicking on dialog buttons won’t close the dialog. It seems it works a few weeks earlier but since we upgraded to 19.4.0.41, it doesn’t work.

Do you think it is a bug?

Thanks for your help.

Best regards.

François


Attachment: DialogShowVisibleConflict_95bb6c77.zip

6 Replies 1 reply marked as answer

BS Buvana Sathasivam Syncfusion Team January 11, 2022 02:39 PM UTC

Hi Francois, 

Greetings from Syncfusion support. 

We have checked your code. After the 19.4.38 version, we added load-on-demand support to the SfDialog component.  After these changes, the Blazor Dialog will be destroyed and removed from the DOM element when the Blazor Dialog is closed. By default, SfDialog content is rendered based on on-demand support. To close the dialog, we recommend using the HideAsyc() public method rather than disabling the Visible property. 

private async Task CloseDialog() 
    { 
        await RefDialog.HideAsync(); 
    } 

If you wish to render the Blazor Dialog in a prior version, you can enable the AllowPrerender property. It will hide the Blazor Dialog and maintain it in the DOM element when closing it. 


Please let us know if you have any concerns. 

Regards, 
Buvana S 



FR Francois January 13, 2022 10:35 PM UTC

Hi Buvana,

thank you for your reply.

The new "AllowPrerender" property is interesting.

However I'm not sure to have fully understand, I steel have two questions :

1) Is there a difference between using "HideAsync/ShowAsync" method and using "Visible" (= false/true) property to hide/show dialogs ?

With HideAsync/ShowAsync method :

<SfDialog @ref="@RefDialog" >

    private async Task OpenDialogAsync()

    {

        await RefDialog.ShowAsync().ConfigureAwait(false);

    }


    private async Task CloseDialog()

    {

        await RefDialog.HideAsync().ConfigureAwait(false);

    }


With "Visible" property  :

<SfDialog @bind-Visible="@IsVisible">

    private async Task OpenDialogAsync()

    {

        IsVisible = true;

    }


    private async Task CloseDialog()

    {

        IsVisible = false;

    }


2) Shouldn't the "ShowAsync" method pass the "Visible" property to true ?

Since the "ShowAsync"  method makes the dialogue visible.

Best Regards.

François



BS Buvana Sathasivam Syncfusion Team January 14, 2022 03:28 PM UTC

Hi Francois, 
Currently, we are validating your reported query. We will update you with further details on or before January 17, 2022. 
  
Regards, 
Buvana S 



BS Buvana Sathasivam Syncfusion Team January 18, 2022 08:43 AM UTC

Hi Francois, 
 
Thank you for your patience. 
 
Query #1: “Is there a difference between using "HideAsync/ShowAsync" method and using "Visible" (= false/true) property to hide/show dialogs ?” 
 
There is no distinction between using public methods(HideAsync/ShowAsync) and using Visible property. Both functionalities is the same and is used to display or hide the Blazor Dialog via public methods or properties. 
 
Query #2: “Shouldn't the "ShowAsync" method pass the "Visible" property to true ?” 
 
We have considered the issue "The Visible property is not changed when using the Show public method" as a bug from our end, and the fix for the issue will be included with our upcoming weekly patch release on January 25th, 2022. 
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link: 
 
Regards, 
Buvana S 


Marked as answer

BS Buvana Sathasivam Syncfusion Team January 25, 2022 05:46 PM UTC

Hi Francois, 

We are facing complexity to resolve the issue. We will include the fix in February 1, 2022 patch release. We appreciate your patience until then. 

Regards, 
Buvana S 



BS Buvana Sathasivam Syncfusion Team February 1, 2022 06:30 PM UTC


Hi Francois, 
 
We are glad to announce that our Essential Studio 2021 Volume 4 SP release v19.4.0.48 is rolled out and is available for download under the following link. 
 
 
Your issue " The Visible property is not changed when using the Show public method" was also fixed and included in this release.  We request that you upgrade the package to the "19.4.48" version to get rid of this issue. 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 

Regards, 
Buvana S 


Loader.
Up arrow icon