XinTable Component
XinTable is an out-of-the-box CRUD table component that generates a complete table page with search, create, edit, delete, pagination, sorting, and filtering capabilities through JSON configuration.
Core Features
- Auto CRUD — Automatically connects to backend CRUD APIs with just
apiandaccessName - JSON-driven Column Config — Column definitions control table display, search form, and edit form simultaneously
- Search Form — Auto-generated from column config, supports expand/collapse
- Keyword Search — Built-in quick search with remote fuzzy search support
- Action Bar — Built-in create/edit/delete buttons with permission control
- Table Tools — Refresh, density toggle, border toggle, column visibility settings
- Form Reuse — Create and edit share the same modal form, distinguished by
FormMode - Fully Customizable — All built-in behaviors can be replaced via callbacks
Basic Usage
This single configuration generates a complete user management page.
Column Configuration (XinTableColumn)
XinTableColumn extends both FormColumn and TableColumnType, controlling table column, search form, and edit form display from a single definition.
Extended Properties
Column Visibility Example
Display Controls
Toggle Properties
Row-Level Edit/Delete Control
Search Features
Advanced Search (SearchForm)
Click the "Search" button in the action bar to expand/collapse the advanced search form. Search columns are auto-generated from columns where hideInSearch !== true.
Keyword Search
A built-in quick search input triggers a remote search on Enter or icon click. The keywordSearch field is included in the request params.
Custom Search Field Configuration
When a field needs different configuration in the search form vs. table/form, use the search property to override:
Customizing Action Bars
Top Action Bar (actionBarRender)
Customize the create button, search toggle, and keyword search input:
Tool Bar (toolBarRender)
Customize refresh, density, border, and column settings tools:
Operate Column (operateRender)
Customize the action buttons for each table row:
Set operate column properties via operateProps:
Custom Requests
Custom Data Request
Request Parameter Preprocessing
Custom Form Submit
XinTableInstance Methods
Access the table instance via tableRef:
Instance Methods
Table Tools
Four built-in tool buttons: refresh, density toggle, border toggle, and column settings.
Density Toggle
Column Settings
Toggle column visibility via a Tree checkbox control, with changes applied instantly.
Permission Control
accessName is used for both API path construction and button permission control:
{accessName}.create— Create button{accessName}.update— Edit button{accessName}.delete— Delete button
Buttons are wrapped with the AuthButton component and will not render when the user lacks the required permission.
XinTableProps Full Reference
Also inherits all
TableProps<T>properties exceptcolumns,rowKey,onChange,pagination.
Request Parameters
API Convention
The built-in CRUD methods follow this API convention:
To use a different API format, override via handleRequest and handleFinish.