Class DropdownOption<TOption>
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
Registration-only descriptor for a BOBInputDropdown option. Intentionally inherits
Microsoft.AspNetCore.Components.ComponentBase (not BOBComponentBase) because it emits no DOM of its own —
the parent dropdown container consumes the registered option and renders the menu items.
public class DropdownOption<TOption> : ComponentBase, ISelectionOption
Type Parameters
TOption
- Inheritance
-
objectComponentBaseDropdownOption<TOption>
- Implements
Constructors
DropdownOption()
public DropdownOption()
Properties
ChildContent
The content to render for this option.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
- RenderFragment
Container
The parent dropdown container this option is registered with.
[CascadingParameter]
public IDropdownContainer? Container { get; set; }
Property Value
Disabled
When true, forces the option to be disabled.
[Parameter]
public bool Disabled { get; set; }
Property Value
- bool
Text
The display text for this option.
[Parameter]
public string? Text { get; set; }
Property Value
- string
Value
The value associated with this option.
[Parameter]
[EditorRequired]
public TOption? Value { get; set; }
Property Value
- TOption
Methods
Dispose()
Unregisters this option from the parent container.
public void Dispose()
OnInitialized()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
protected override void OnInitialized()