AdminCheckboxListGeneric Component
Overview
A generic checkbox list component. Renders an entity list as a group of checkboxes, supporting multi-value binding. Commonly used in role assignment, permission settings, and similar scenarios.
Parameters
| Parameter | Description |
|---|---|
| TItem | Option entity type |
| TValue | Value type (e.g., long) |
| Items | Option list (List<SelectedItem<TValue>>) |
| @bind-Value | Bind the selected value list |
Usage Example
<AdminCheckboxListGeneric TItem="SysRole" TValue="long"
Items="@roleItems"
@bind-Value="@user.Roles" />
Notes
Itemsneeds to be prepared in advance as aSelectedItem<TValue>list- The
TValuetype must match the entity's primary key type