The RadzenAlert can't open a second time

Hi,

If the RadzenAlert closes by clicking the X on the box can not be visible again. If the RadzenAlert closes from the code it can be shown again. I tried to use ref, but the visible property cannot be used outside of the component.

This is unusable for showing different error messages on the page.

I can not be sure if this is a bug or if my knowledge is not enough.

I shared a small project. You can find the screencast to regenerate the issue.

  1. Start the project. The Open Alert button will show
  2. Click the Open Alert button. The RadzenAlert will show.
  3. Click the Close Alert button. The RadzenAlert will hide.
  4. When you repeat 2 and 3 everything will run.
  5. Click the X button on the alert box. The RadzenAlert will hide but the button caption will not change.
  6. The RadzenAlert will not show again.

RadzenAlertTest

RadzenTest.zip (515.7 KB)

Hi @koksal.basar,

I reproduced the issue. The main problem is

  1. The boolean you are using is not in sync with the internal state of RadzenAlert after the user clicks the close button. We will have to implement some means of syncing - either support @bind-Visible or create a Close event which you can handle.
  2. The current implementation always uses the internal state after the user closes the alert and as a result setting the Visible property has no effect after that.
1 Like

Decided to support both @bind-Visible and Close event. Will be live with the next update of Radzen.Blazor.

2 Likes