Table
Introduction
The table component is a low-code tool for displaying and managing large amounts of structured data. It includes built-in features such as sorting, filtering, searching, and paging. Developers can use simple configurations and drag-and-drop actions to quickly build rich data display interfaces. The component is highly customizable and can be used in various scenarios, from basic data lists to complex interactive systems. It offers an intuitive and efficient data management experience.
As shown in the following figure, the table component consists of three main parts: a toolbar, a table area, and a paging area. The table area contains two basic units: data columns and operation columns.
Configuration items
Category |
Configuration |
Example |
Description |
Content |
Data source |
|
The data source for the table. Use this to configure the structured data source that the table currently displays. As the example shows, this configuration item must be a standard array of JavaScript objects. |
Primary key |
The field name that uniquely identifies each row in the structured data. In the table component, it acts as the unique identifier for each record to ensure accurate data referencing and operations.
Important
The primary key must be unique and stable across the entire structured dataset. A correct primary key ensures that the table data renders properly and that the currentItem is retrieved accurately. |
||
Empty data text |
|
The text to display in the table area when the data source is empty. |
|
Data column configuration |
|
Configures the display and behavior of each column in the table. The main configuration items are as follows:
|
|
Operation column configuration |
|
Configures the content and interactive behavior of the operation column on the right side of the table area. The main configuration items are as follows:
|
|
Show toolbar |
|
Specifies whether to show the table toolbar. |
|
Toolbar configuration |
|
Configures the title, style, and interaction of the settings items in the table component's toolbar. The main configuration items are as follows:
|
|
Interaction |
Hidden |
|
Hidden. For more information, see Common Properties. |
Keep layout when hidden |
|
Preserves the layout when hidden. For details, see Common Properties. |
|
Loading |
|
Specifies whether the table component shows a loading state. |
|
Row selection mode |
|
Defines the interaction mode for selecting table rows. |
|
Paging settings |
|
Defines the display and interaction of the paging area. The main configurations are as follows:
|
|
Style |
Margin |
|
Outer margin. For more information, see General Properties. |
Table size |
|
The size of the table. |
|
Show column borders |
|
Specifies whether to show column borders. |
|
Table background color |
|
Defines the background color of the table. |
|
Header background color |
|
Defines the background color of the table header. |
|
Header text color |
|
Defines the text color of the table header. |
|
Header separator color |
|
Defines the color of the separator lines in the table header. |
|
Table border color |
|
Defines the border color of the table. |
Properties and methods
Name |
Type |
Example |
Description |
dataSource |
Array<any> |
|
The data source of the table component. |
column |
Array<{ title: string; hidden: boolean; dataIndex: string; type: string; }> |
|
The column configuration data of the table component. |
rowKey |
string |
|
The primary key of the table component. |
changedArray |
Array<any> |
|
The data that has changed after saving edits to the table. |
selectedRows |
Array<any> |
|
The currently selected data content in the table. |
pagination |
{ current: number; pageSize: number; } |
|
The paging data for the table, which includes the current page number and page size. |
currentSort |
Array<{ key: string; order?: 'ascend' | 'descend' }> |
|
Data about the current sorting state of the table. |
currentFilter |
Array<{ key: string; value?: any[]; }> |
|
Data about the current filtering state of the table. |
rowSelectionMode |
multiple | single | none |
|
The current row selection mode of the table. |
loading |
boolean |
|
The current loading state of the table component. |
setDataSource |
func |
|
Sets the data source for the table. |
clearDataSource |
func |
|
Clears the data source of the table. |
setLoading |
func |
|
Sets the loading state of the table. |
clearLoading |
func |
|
Clears the loading state of the table. |
setColumns |
func |
|
Sets the column configuration for the table. Use this method to dynamically show operation columns or change column configurations. |
setSelections |
func |
|
Sets the currently selected data rows in the table. |
clearSelections |
func |
|
Clears the currently selected data rows in the table. |
Event callbacks
Configuration |
Description |
|
The event triggered when the table is clicked. |
|
The event triggered when a table row is selected. |
|
The event triggered when editable table data is saved. |
|
The event triggered when paging, filtering, or searching changes in the table. |

























