Select<TItem>
ClassFor examples and usage details, see the component documentation.
View Select<TItem> ComponentNamespace:
RazorConsole.ComponentsAssembly:
RazorConsole.CoreDefinition
public class Select<TItem> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRenderConstructors
1| Name | Type | Description |
|---|---|---|
Select() | Constructor | — |
Properties
17| Name | Type | Description |
|---|---|---|
Behavior | ||
FocusedValue | <TItem> | Currently highlighted option during keyboard navigation (may differ from committed Value). |
FocusedValueChanged | EventCallback<TItem> | Event raised when the focused option changes. |
IsFocused | Boolean | Indicates whether the select currently has focus. |
IsFocusedChanged | EventCallback<Boolean> | Event raised when the focus state changes. |
SelectedIndicator | Char | Character used to indicate the focused option. |
SelectedOptionDecoration | Decoration | Text decoration for the focused option. |
UnselectedIndicator | Char | Character used to indicate non-focused options. |
Appearance | ||
OptionForeground | Color | Foreground color for non-focused options. |
SelectedOptionForeground | Color | Foreground color for the focused option. |
Common | ||
Value | <TItem> | Currently committed option value. |
ValueChanged | EventCallback<TItem> | Event raised when the committed value changes. |
Other | ||
AdditionalAttributes | IReadOnlyDictionary<String, Object> | Additional attributes to apply to the root element. |
Comparer | IEqualityComparer<TItem> | Custom comparer for items in the list. Default is object.Equals() |
Expand | Boolean | Expands the rows layout to fill available space when true. |
Formatter | System.Func<{TItem>,System.String} | Custom formatter for the items in the list. Default is object.ToString() |
OptionDecoration | Decoration | Text decoration for non-focused options. |
Options | <TItem>[] | Available options rendered by the select. |
Methods
1| Name | Type | Description |
|---|---|---|
BuildRenderTree(RenderTreeBuilder)() | Method | — |