ProTable API
ProTable is an enhanced table component built on top of Ant Design Table with advanced features like data fetching, column state management, and integrated search forms.ProTableProps
Column configuration with extended features beyond standard Ant Design columns.
A method to fetch dataSource from the server.
Additional parameters for the request. Modifying this will trigger a reload.
Static data source for the table (alternative to using request).
Default data to display before request completes.
Reference to control the table programmatically.
Reference to the search form instance.
Configuration for the list toolbar.
Render function for custom toolbar actions.
Render function for the options area (density, column settings, etc.).
Configuration for the search form. Set to
false to disable.Configuration for the search form (applies to both form type and search form).
How to format dates in the request.
"string"- Format as YYYY-MM-DD"number"- Format as timestampfalse- No formattingfunction- Custom formatter
Transform search form data before submission.
Callback triggered after data is loaded.
Callback triggered when loading state changes.
Callback triggered when request fails.
Callback triggered when search form is submitted.
Callback triggered when search form is reset.
Process data after request returns.
Configuration for column state persistence.
Configuration for table options (reload, density, column settings).
Row selection configuration (extends Ant Design rowSelection).Additional properties:
alwaysShowAlert?: boolean- Always show selection alert
Custom render for the selection alert.
Custom render for selection alert actions.
Configuration for editable rows.
Callback when data source changes (for editable table).
Props for the outer card wrapper. Set to
false to disable card.Border configuration for search form and table card.
Ghost mode - removes card padding and background.
Title in the top left corner.
Tooltip for the header title.
Custom render for the entire table.
Custom render for the table view (used internally by ProList).
Render extra content between search form and table.
Custom render for the search form.
ClassName for the table wrapper.
Style for the table wrapper.
Text to display when cell value is empty.
Polling interval in milliseconds. Minimum is 2000ms.
Whether to manually trigger the request.
Auto reload when window gains focus (only works with request).
Debounce time for form changes in milliseconds.
Default table size.
Callback when table size changes.
Component type for schema rendering.
Name for editable table to communicate with form directly.
Custom error boundary component.
ProColumns
Extends Ant Design’s ColumnType with additional properties.Data index for the column.
Column title.
Type of the value for rendering and editing.
Value enum for mapping values to display text.
Props passed to the field component.
Props for the Form.Item wrapper.
Custom render for the cell in read mode.
Transform the value before rendering.
Custom render for the form field in edit mode.
Configuration for search form.
false- Hide in search formtransform- Transform value before submission
Hide column in table.
Hide in create form.
Hide in search form.
Hide in column settings.
Hide in descriptions.
Sort order in form (higher values appear first).
Index for the column.
Number of grid columns the form item occupies.
Initial value for search form.
Whether to show ellipsis for long text.
Whether the value is copyable.
Tooltip for the column header.
Filter menu items.
Filter function. Set to
false to disable local filtering.Sorter configuration.
boolean- Enable/disable sortingstring- Field name for remote sortingfunction- Local compare functionobject- Advanced sorter config
Whether the column is editable.
Whether the column is readonly.
Disable column settings.
List item slot for ProList.Options:
title, subTitle, avatar, description, content, actions, aside, typeAsync function to load remote data for select/cascader fields.
Parameters for the request function.
Debounce time for request in milliseconds.
RequestData
Return type for the request function.Array of data items.
Whether the request was successful.
Total number of items (for pagination).
Usage Examples
- Basic Usage
- With Search Form
- With ActionRef