We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. I want to performa an action when a sidebar DropDownToggle item is clicked
Describe the solution you'd like
<BarDropdown> <BarDropdownToggle Clicked="@((visible) => LoadMarkup(visible, markUp))"> <BarIcon IconName="FontAwesomeIcons.CropAlt" Style="font-size: 1rem;" /> @markUp.Name </BarDropdownToggle>
I have tried both of the following and they are not called !
they
@inherits Blazorise.BarDropdownToggle @code { [Parameter] public EventCallback Clicked { get; set; } //protected new Task ClickHandler() //{ // Console.WriteLine(@"ClickHandler - IN"); // Clicked.InvokeAsync((object)null); // return base.ClickHandler(); //} protected override void HandleVisibilityStyles(bool visible) { Console.WriteLine(@"HandleVisibilityStyles - IN: {0}", visible); if (visible) Clicked.InvokeAsync((object)null); base.HandleVisibilityStyles(visible); } }
The text was updated successfully, but these errors were encountered:
FYI: I have managed to do it this way:
//@*https://github.com/stsrki/Blazorise/issues/2043*@ using System; using Microsoft.AspNetCore.Components; namespace LR.Ocelot.Client_Web.ClientWeb.Shared.Components { public class BarDropdownToggleClick : Blazorise.BarDropdownToggle { [Parameter] public EventCallback Clicked { get; set; } protected override void HandleVisibilityStyles(bool visible) { Console.WriteLine(@"HandleVisibilityStyles - IN: {0}", visible); base.HandleVisibilityStyles(visible); if (visible || ParentDropdownState.Visible) _ = Clicked.InvokeAsync((object)null); } } }
Notice the inclusion of the ParentDropdownState.Visible
ParentDropdownState.Visible
Sorry, something went wrong.
It's a hack but as long as it works I guess it's OK. In the meantime, I can add it for the next release.
Clicked
No branches or pull requests
Is your feature request related to a problem? Please describe.
I want to performa an action when a sidebar DropDownToggle item is clicked
Describe the solution you'd like
Additional context
I have tried both of the following and
they
are not called !The text was updated successfully, but these errors were encountered: