Skip to main content

List

Container properties

All component configurations support Container properties at the first level.

Component Properties

NameTypeDefaultWhether Variable Patternis supported Description
classNamestring✔️The className of the component
styleobjectThe style of the component.
itemFieldobject@deprecated, use fields instead. The json schema of each element in the List supports the use of the element
direction'row' | 'column'@deprecated, use style.flexDirection instead.
wrapboolfalse@deprecated, use style.flexWrap instead.
gapnumber@deprecated, use style.gap instead.
emptybool | objectfalseThe placeholder that is displayed when there is no data, the Empty attribute of antd is
itemPropsobjectThe attribute
LoadingPropsLoadingPropsProperties passed to the Loading component
dataSource{ token: string, pbcToken: string, listUrl: string }data source
dataUrlConditionalListOrSinglePropertyPropType(string)Get data via dataUrl.
dataFiltersConditionalListPropertyPropType(DataFilters)✔️Fixed filter conditions hidden by requesting data source cannot be changed through the interface
sortModelArray<SortModel>How to sort data
dataResponseKeyPathstring'results'Take a sub-data in the response data as the result.
transformDataResponsestringTransform the obtained data, using the eval expression, this refers to the obtained data.
translateDataResponsebooltrueWhether you need to translate the result of the request
debounceTimenumber200The debounce time of the request data, which triggers leading.
defaultValueobjectThe default data of the data source will be merge with the data requested by the API. If the API request returns an array, merge with each item of the array. If the API request returns an object, merge with the object.
httpMethod'get' | 'post''get'http method for data requests.
selectColIdArray<string>Load data fields, and load all fields if not configured.
lazyLoadingboolfalseWhether to enable lazy loading
cacheBlockSizenumber30Lazy load the amount of data per request

All the remaining componentsProps will be passed to the component root element (div).

SortModel

NameTypeDefaultDescription
colIdstringSort field id
sort'asc' | 'desc''asc'sort in order or descending order
sortType'text' | 'number' | 'date''text'What type do values ​​sort by

LoadingProps

NameTypeDefaultDescription
sizenumber20loading element size, default 20px
centeredbooltrueWhether to center
overlayboolfalseWhether to display translucent mask layer
delayedboolfalseWhether to delay display
delayTimenumber800Delay time (ms)

JS API

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

NameTypeDescription
nodeHTML ElementComponent root DOM element
getData() => anyGet all data
refresh() => voidRefresh data