Skip to main content

Table

Container properties

All component configurations support Container properties at the first level.

Component properties

NameTypeDefaultSupports Variable PatternDescription
classNamestring✔️The className of the component
styleobjectThe style of the component
columnDefsobjectag-grid column definition
defaultColDefobjectDefault column definition
dataSource{ token: string, pbcToken: string, listUrl: string }data source
dataUrlstring✔️Get all tabular data at once with dataUrl
pinnedTopDataUrlstring✔️Row data pinned to the top of the table
pinnedBottomDataUrlstring✔️Line data fixed to the bottom of the table
dataFiltersConditionalListPropertyPropType(DataFilters)✔️Fixed filter conditions hidden by requesting data source cannot be changed through the interface
translateDataResponseboolfalseIs the translation request result required
httpMethod'get' | 'post''get'The http method used to send a request when obtaining data
httpBodyobject️ ✔️Get the request data when sending the post request, and it will overwrite the automatic generated body
selectColIdArray<string>Loaded data fields, all fields will be loaded without configuration.
needCountbooltrueWhether the number of queries is required for requests
searchTextColIdsArray<string>Specify the drop-down box to blur the search field, if not specified, search globally
suppressToolbarConditionalPropertyPropType(bool)false✔️Prohibited Toolbar
suppressToolbarActionsConditionalPropertyPropType(bool)false✔️All operation buttons for Toolbar
suppressAddButtonConditionalPropertyPropType(bool)false✔️Disable "Add" buttons
suppressFuzzySearchConditionalPropertyPropType(bool)false✔️Forbidden fuzzy search
suppressFuzzySearchSpeechConditionalPropertyPropType(bool)false✔️Voice search function that prohibits fuzzy search
suppressColumnSelectConditionalPropertyPropType(bool)false✔️"Show /Hide" columns are prohibited
suppressExcelExportConditionalPropertyPropType(bool)false✔️Disable Excel export function
suppressToolbarRefreshConditionalPropertyPropType(bool)false✔️Disable the "Refresh" button on the toolbar
suppressTableSettingConditionalPropertyPropType(bool)false✔️Prohibit the toolbar to expand the setting function
suppressFullscreenConditionalPropertyPropType(bool)false✔️Disable the full-screen feature
suppressSaveSettingConditionalPropertyPropType(bool)false✔️Forbid to save table settings
suppressFilterPanelConditionalPropertyPropType(bool)false✔️Disables the toolbar's Filter panel
suppressFavoriteViewConditionalPropertyPropType(bool)false✔️Save multiple Views are prohibited
supportShowDeletedConditionalPropertyPropType(bool)false✔️Whether the "Show deleted" function is supported
suppressRefreshDataWhenFilterChangeConditionalPropertyPropType(bool)false✔️It is prohibited to automatically refresh data after modifying filter conditions in Filter Panel.
settingKeystringTable settings saved key
tableSize'default' | 'small''default'Table size, default or compact mode
addButtonHrefConditionalPropertyPropType(string)false✔️Added link address of the button
addButtonContentstringfalseAdded text for buttons
fuzzySearchPlaceholderstringfalsePlaceholder of fuzzy search input box
fuzzySearchOpenboolfalseWhether the fuzzy search will be displayed forever
excelExportFilenamestring'export'Export Excel file name
excelExportMaxSizePerReqnumber1000How many rows are the requests for exporting Excel sent in batches
paginationboolfalseWhether to use the paging function
paginationPageSizenumber30The number of rows displayed per page of the paging function
pinnedFilterArray<string>Whether to use the regular refresh data function
intervalboolfalseWhether to use the regular refresh data function
intervalTimenumber10The interval between the tables regularly refreshing data (s)
toolbarFieldsarrayCustom elements of toolbar configured using json
toolbarChildrennodeCustom elements of toolbar configured using jsx
alwaysUseApiFilterboolfalseWhen in clientSide mode, filtering is also performed using the API interface rather than the table's own filtering function.
multiValueKeystring'label'Data attributes used by table ACL and Select functions when filtering and grouping columns that call MultiValueCellRenderer
onSwitchFavoriteView(newView) => voidThis function is called when the table toolbar switches views

All the remaining componentsProps will be passed to the component root element(AgGridReact)。

JS API

The interface obtained through formApi.getFieldApi() is as follows:

NameTypeDescription
nodeHTML ElementComponent root DOM element
gridApiobjectAg-Grid's api interface, official document
getComponentProps() => objectGet the component properties of the table componentProps
updateComponentProps() => voidModify the component properties of the table componentProps, [Example](/docs/platform/frontend/use-component/use-table# Dynamically modify table columns)
getTableState() => { tableSize, columnState, filterModel, paginationPageSize }Get the current table status
getSearchText() => stringGet the current fuzzy search text
getSelectedIds() => arrayGet the id of the row selected in the current table, and return the array regardless of multiple choices
refresh() => voidRefresh table data