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
|
private async Task CloseDialog()
{
await RefDialog.HideAsync();
} |
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