Assembly: Neon.Tailwind.dll
public class HeadlessMenu : ComponentBase
Constructors
Declaration
Properties
Declaration
public string ActiveItemId { get; }
Property Value
Declaration
[Parameter(CaptureUnmatchedValues = true)]
public IReadOnlyDictionary<string, object> AdditionalAttributes { get; set; }
Property Value
Declaration
public string ButtonElementId { get; }
Property Value
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Declaration
[Parameter]
public int DebouceTimeout { get; set; }
Property Value
Declaration
public bool HasRendered { get; set; }
Property Value
Declaration
public string ItemsElementId { get; }
Property Value
Declaration
[Parameter]
public EventCallback OnClose { get; set; }
Property Value
Declaration
[Parameter]
public EventCallback OnOpen { get; set; }
Property Value
Declaration
public string SearchQuery { get; }
Property Value
Declaration
public MenuState State { get; protected set; }
Property Value
Methods
Declaration
public ValueTask ButtonFocusAsync()
Returns
Declaration
public Task Close(bool suppressFocus = false)
Parameters
Type |
Name |
Description |
bool |
suppressFocus |
|
Returns
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
Declaration
public void GoToItem(HeadlessMenuItem item)
Parameters
Declaration
public void GoToItem(MenuFocus focus)
Parameters
HandleClickOff()
Declaration
public Task HandleClickOff()
Returns
Declaration
public bool IsActiveItem(HeadlessMenuItem item)
Parameters
Returns
Declaration
public ValueTask MenuItemsFocusAsync()
Returns
Method invoked after each time the component has been rendered interactively and the UI has finished
updating (for example, after elements have been added to the browser DOM). Any ElementReference
fields will be populated by the time this runs.
This method is not invoked during prerendering or server-side rendering, because those processes
are not attached to any live browser DOM and are already complete before the DOM is updated.
Note that the component does not automatically re-render after the completion of any returned Task,
because that would cause an infinite render loop.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type |
Name |
Description |
bool |
firstRender |
Set to true if this is the first time OnAfterRender(bool) has been invoked
on this component instance; otherwise false .
|
Returns
Type |
Description |
Task |
A Task representing any asynchronous operation.
|
Overrides
Declaration
Returns
Declaration
public void RegisterButton(HeadlessMenuButton button)
Parameters
Declaration
public void RegisterItem(HeadlessMenuItem item)
Parameters
Declaration
public void RegisterItems(HeadlessMenuItems items)
Parameters
Declaration
public Task SearchAsync(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Declaration
Returns
Declaration
public void UnregisterItem(HeadlessMenuItem item)
Parameters