HxCheckboxList

Multiple choice by checkboxes.

HxCheckboxList

Selected values:

API

Parameters

Name Type Description
Data IEnumerable<bool> Items to display.
TextSelector Func<bool, string> Selects text to display from item. When not set, ToString() is used.
ValueSelector Func<bool, string> Selects value from item. Not required when TValue is same as TItem.
SortKeySelector Func<bool, IComparable> Selects value for items sorting. When not set, TextSelector property will be used. If you need complex sorting, pre-sort data manually or create a custom comparable property.
AutoSort bool When true, items are sorted before displaying in select. Default value is true.
Label string Label to render before input (or after input for Checkbox).
LabelTemplate RenderFragment Label to render before input (or after input for Checkbox).
Hint string Hint to render after input as form-text.
HintTemplate RenderFragment Hint to render after input as form-text.
CssClass string Custom CSS class to render with wrapping div.
LabelCssClass string Custom CSS class to render with the label.
InputCssClass string Custom CSS class to render with the input element.
ShowValidationMessage bool When false, validation message is not rendered. Default is true.
GenerateChip bool When true, HxChipGenerator is used to generate chip item(s). Default is true.
ChipTemplate RenderFragment Chip template.
Enabled bool? When null (default), the Enabled value is received from cascading FormState. When value is false, input is rendered as disabled. To set multiple controls as disabled use HxFormState.
AdditionalAttributes IReadOnlyDictionary<string, object>
Value List<string>
ValueExpression Expression<Func<List<string>>>
DisplayName string

Event Callbacks

Name Type Description
ValueChanged EventCallback<List<string>>

Methods

Method Returns Description
FocusAsync() ValueTask Throws NotSupportedException - giving focus to an input element is not supported on the HxCheckboxList.
An unhandled error has occurred. Reload 🗙