I have the following code in a cs file for razor component:
catch (Exception ex)
{
NotificationService.Notify(new NotificationMessage
{
Severity = NotificationSeverity.Error,
Summary = $"Unable to get States.",
Detail = ex.Message,
CloseOnClick = true
});
}
But the close on click does not appear and the notification closes after the elapsed time. The notification shows up. I have the notification in the main and registered and injected with DI. Do you know what I'm doing wrong?
enchev
July 24, 2023, 1:25pm
2
Not sure what you expect to appear - this will just close the notification on click, there is no additional UI associated with this property.
Nothing appears, and that's okay. The notification does not wait for a click, it closes after the default time.
enchev
July 24, 2023, 1:57pm
4
The idea of this property is to close the notification by clicking anywhere in the notification not just the close button.
I understand that, but the problem is that the notification closes after a period of time, not based on the click.
enchev
July 25, 2023, 6:10am
6
The last demo works normally exactly using this setting: