Blazorise Select API
Explore the Blazorise Select API reference for parameters, events, methods, and related types.
For examples and usage guidance, see the Select documentation.
API
Parameters
Select
| Parameter | Description | Type | Default |
|---|---|---|---|
AriaDescribedBy |
Specifies the aria-describedby attribute value. RemarksWhen set, this value is rendered as-is and overrides help and validation message ids generated by Field and Validation. |
string | |
AriaInvalid |
Specifies the aria-invalid attribute value. RemarksWhen set, this value is rendered as-is and overrides the validation-derived aria-invalid state. |
string | |
AriaLabelledBy |
Specifies the aria-labelledby attribute value. RemarksWhen set, this value is rendered as-is. Some non-labelable controls can otherwise derive it automatically from a parent FieldLabel or FieldsLabel. |
string | |
AriaRequired |
Specifies the aria-required attribute value. RemarksWhen set, this value overrides the required-field state resolved from the parent Validation. |
bool | false |
Autofocus |
Set's the focus to the component after the rendering is done. |
bool | false |
ChildContent |
Specifies the content to be rendered inside this Select. |
RenderFragment | null |
Disabled |
Add the disabled boolean attribute on an input to prevent user interactions and make it appear lighter. |
bool | false |
Feedback |
Placeholder for validation messages. |
RenderFragment | null |
Loading |
Specifies loading property. |
bool | false |
MaxVisibleItems |
Specifies how many options should be shown at once. |
int? | null |
Multiple |
Specifies that multiple items can be selected. |
bool | false |
ReadOnly |
Add the readonly boolean attribute on an input to prevent modification of the input’s value. |
bool | false |
Size |
Sets the size of the input control. |
Size? | null |
TabIndex |
If defined, indicates that its element can be focused and can participates in sequential keyboard navigation. |
int? | null |
Value |
Specifies the value inside the input field. |
TValue | null |
ValueExpression |
Specifies an expression that identifies the input value. |
Expression<Func<TValue>> | null |
SelectItem
| Parameter | Description | Type | Default |
|---|---|---|---|
ChildContent |
Specifies the content to be rendered inside this SelectItem. |
RenderFragment | null |
Disabled |
Disable the item from mouse click. |
bool | false |
Hidden |
Hide the item from the list so it can be used as a placeholder. |
bool | false |
Value |
Specifies the item value. |
TValue | null |
SelectGroup
| Parameter | Description | Type | Default |
|---|---|---|---|
ChildContent |
Specifies the content to be rendered inside this SelectGroup. |
RenderFragment | null |
Label |
Specifies the group label. |
string |
Events
Select
| Event | Description | Type |
|---|---|---|
Blur |
The blur event fires when an element has lost focus. |
EventCallback<FocusEventArgs> |
CustomValidationValue |
Used to provide custom validation value on which the validation will be processed with the Validator handler. RemarksShould be used carefully as it's only meant for some special cases when input is used in a wrapper component, like Autocomplete or SelectList. |
Func<TValue> |
FocusIn |
Notifies when the input box gains focus. |
EventCallback<FocusEventArgs> |
FocusOut |
Notifies when the input box loses focus. |
EventCallback<FocusEventArgs> |
KeyDown |
Notifies when a key is pressed down while the control has focus. |
EventCallback<KeyboardEventArgs> |
KeyPress |
Notifies when a key is pressed while the control has focus. |
EventCallback<KeyboardEventArgs> |
KeyUp |
Notifies when a key is released while the control has focus. |
EventCallback<KeyboardEventArgs> |
OnFocus |
Notifies when the input box gains or loses focus. |
EventCallback<FocusEventArgs> |
ValueChanged |
Occurs after value has changed. |
EventCallback<TValue> |
Methods
Select
| Method | Description | Return | Parameters |
|---|---|---|---|
AddSelectItem |
Notifies the ISelectItem that it has been initialized. | void | ISelectItem selectItem |
ContainsValue |
Indicates if Select contains the provided item value. | bool | object value |
RemoveSelectItem |
Notifies the ISelectItem that it has been removed. | void | ISelectItem selectItem |
Focus |
Sets the focus on the underline element. | Task | bool scrollToElement |
Revalidate |
Forces the Validation (if any is used) to re-validate with the new custom or internal value. | Task |
SelectItem
| Method | Description | Return | Parameters |
|---|---|---|---|
CompareTo |
Checks if the value is equal to the item value. | bool | object value |