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

  • Items needs to be prepared in advance as a SelectedItem<TValue> list
  • The TValue type must match the entity's primary key type