Open Closed

Question on PageToolbar for Blazor Server #3883


User avatar
0
balessi75 created

ABP Commercial (5.2) / EF / Blazor Server

Hi, We are using the following in the OnInitializedAsync method of our .razor page...

            Toolbar.AddButton("New Entry", async () =>
            {
                await OpenCreateEntryModal();
  
            }, icon: Blazorise.IconName.Add);

This works perfectly, but we need to be able to later on dynamically change the tool bar button. For example, under a certain condition, as the user works with the page, we would like to either disable or hide the button. Is this possible with ABP?


1 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Can you check this? https://support.abp.io/QA/Questions/3592/How-do-I-force-the-Blazor-toolbar-to-refresh#answer-2377648f-0b46-ed07-7678-3a05dc1c9234

    It's a good demonstrate for managing toolbaritems according to other events in application.

    You can define your own custom component instead of using .AddButton() method and that component can decide rendering itself or not according to a data.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11