AdminSelectTable Component

Overview

A dialog table selector. Clicking the input box opens a table dialog where users select a single record from the table. After selection, the display text and ID are automatically populated. Commonly used in forms for selecting related entities, such as selecting users or departments.

Features

  • Popup table dialog with pagination and search support
  • Supports binding to the entity object (@bind-Value) or entity ID (@bind-ValueId)
  • Supports custom table columns in the dialog

Parameters

Parameter Description
TItem Entity type
@bind-Value Bind the complete selected entity object
@bind-ValueId Bind the primary key ID of the selected entity
GetText Set the display text after selection
TableColumns Custom column template for the dialog table

Usage Example

<AdminSelectTable TItem="SysUser"
    @bind-ValueId="@selectedUserId"
    GetText="@(u => u.Nickname)">
    <TableColumns>
        <TableColumn @bind-Field="context.Username" Text="Username" />
        <TableColumn @bind-Field="context.Nickname" Text="Nickname" />
    </TableColumns>
</AdminSelectTable>