Open Closed

Notifications(Bell Icon) component ShowNotifications button is not working #6728


User avatar
0
yusufsarman created
  • 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");
    }
}

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

5 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hello , Can you please give steps to reproduce the issue. Thank you.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    yusufsarman created

    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.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    yusufsarman created

    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"); } }

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    yusufsarman created

    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"); } }

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Yes sure , your ticket is refunded. Thanks for giving the updates.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on October 05, 2026, 11:32
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.