Select<TItem>

Class

For examples and usage details, see the component documentation.

View Select<TItem> Component
Namespace: RazorConsole.Components
Assembly: RazorConsole.Core

Definition

public class Select<TItem> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Constructors

1
NameTypeDescription
Select()Constructor

Properties

17
NameTypeDescription
Behavior
FocusedValue<TItem>Currently highlighted option during keyboard navigation (may differ from committed Value).
FocusedValueChangedEventCallback<TItem>Event raised when the focused option changes.
IsFocusedBooleanIndicates whether the select currently has focus.
IsFocusedChangedEventCallback<Boolean>Event raised when the focus state changes.
SelectedIndicatorCharCharacter used to indicate the focused option.
SelectedOptionDecorationDecorationText decoration for the focused option.
UnselectedIndicatorCharCharacter used to indicate non-focused options.
Appearance
OptionForegroundColorForeground color for non-focused options.
SelectedOptionForegroundColorForeground color for the focused option.
Common
Value<TItem>Currently committed option value.
ValueChangedEventCallback<TItem>Event raised when the committed value changes.
Other
AdditionalAttributesIReadOnlyDictionary<String, Object>Additional attributes to apply to the root element.
ComparerIEqualityComparer<TItem>Custom comparer for items in the list. Default is object.Equals()
ExpandBooleanExpands the rows layout to fill available space when true.
FormatterSystem.Func<{TItem>,System.String}Custom formatter for the items in the list. Default is object.ToString()
OptionDecorationDecorationText decoration for non-focused options.
Options<TItem>[]Available options rendered by the select.

Methods

1
NameTypeDescription
BuildRenderTree(RenderTreeBuilder)()Method