- ABP Framework version: v8.0
- UI Type: lazor Server
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
we developed Notifications(Bell Icon) component with https://docs.abp.io/en/abp/latest/UI/Blazor/Toolbars document. We Used LeptonX template. Notifications(Bell Icon) is showing but onclick event not working. our code
Blazor Module cs
private void ConfigureToolbar()
{
Configure<AbpToolbarOptions>(options =>
{
options.Contributors.Add(new MyToolbarContributor());
});
}
public class MyToolbarContributor : IToolbarContributor
{
public Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
{
if (context.Toolbar.Name == LeptonXToolbars.Main)
{
context.Toolbar.Items.Insert(0, new ToolbarItem(typeof(NotificationsComponent)));
}
return Task.CompletedTask;
}
}
and NotificationsComponent.razor
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase
<div class="nav-link">
<i class="fas fa-bell" @onclick="ShowNotifications"></i>
</div>
@code {
private async Task ShowNotifications()
{
await Message.Info("TODO: Show notifications");
}
}
5 Answer(s)
-
0
Hello , Can you please give steps to reproduce the issue. Thank you.
-
0
I give already all code in my project . I think https://docs.abp.io/en/abp/latest/UI/Blazor/Toolbars document is lack. When I click Notifications(Bell Icon) ShowNotifications event is not triggered.
-
0
and NotificationsComponent.razor
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase <div class="nav-link"> <i class="fas fa-bell" @onclick="ShowNotifications"></i> </div> @code { private async Task ShowNotifications() { await Message.Info("TODO: Show notifications"); } }
-
0
Hi ; I resoılved this issue . Can you refund my ticket ? I replaced NotificationsComponent.razor code in https://docs.abp.io/en/abp/latest/UI/Blazor/Toolbars document
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase <div class="nav-link"> <i class="fas fa-bell" @onclick="ShowNotifications"></i> </div> @code { private async Task ShowNotifications() { await Message.Info("TODO: Show notifications"); } }
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase <div class="nav-link" @onclick="ShowNotifications" > <i class="fas fa-bell"></i> </div> @code { private async Task ShowNotifications() { await Message.Info("TODO: Show notifications"); } }
-
0
Yes sure , your ticket is refunded. Thanks for giving the updates.