English
Common Parameters
About 531 wordsAbout 2 min
2025-12-16
The functional callback of an object list hook receives context and plugin, in that order. Business logic normally uses context; the host merges event-specific parameters and the following common capabilities into this object.
Hook Callback Parameters
| Parameter | Description | Type |
|---|---|---|
| context | List plugin context containing event-specific parameters and common capabilities | Object |
| plugin | Current plugin runtime information; business logic normally does not need it | Object |
| context.bizApi | List business operation methods | Object |
| context.dataGetter | List data access methods | Object |
| context.dataUpdater | List data update methods | Object |
Refer to the corresponding event document for event-specific parameters. For example, list.previewImage.before additionally provides objectApiname, fieldName, data, trData, startIndex, and field.
To obtain the API name of the current list object, use context.dataGetter.getOptions('apiname'). The params.objectApiName value provided to a toolbar button's callback(params) belongs only to that button callback; it is not a common hook parameter.
bizApi
filter(params)
Appends plugin filter conditions and triggers a new list query. This method depends on the table instance, so call it after the table has initialized, such as in list.render.after or a user interaction callback.
| Parameter | Description | Type |
|---|---|---|
| params | Plugin filter parameters | Object |
| params.conditions | Filter condition array | Object[] |
| conditions[].Comparison | Filter operator number | Number |
| conditions[].FieldName | Filter field API name | String |
| conditions[].FilterValue | Filter value | Any |
Returns void. context.filter(params) is an alias of context.bizApi.filter(params) with identical behavior.
refresh()
Refreshes the current list and the active view. It accepts no parameters and returns void. See refresh.
isCrossFilters()
Indicates whether the current list is in cross-object filtering mode. It accepts no parameters and returns Boolean.
dataGetter
getOptions(name)
Returns the configuration value named name from the current list instance.
| Parameter | Description | Type |
|---|---|---|
| name | List configuration property name | String |
Returns the corresponding configuration value as Any.
getDescribe()
Returns the current object describe as Object. It accepts no parameters. See getDescribe.
getDescribeExt()
Returns the current extended object describe as Object. It accepts no parameters. Call it after the object describe has loaded, such as in list.render.after.
findIndex(name, value)
Finds the index of the first row in the current page where item[name] === value.
| Parameter | Description | Type |
|---|---|---|
| name | Row field name used for matching | String |
| value | Field value to match | Any |
Returns Number. It returns the row index within the current page when found, or -1 when no match exists or the current page has no data.
dataUpdater
The methods in dataUpdater depend on the current page's table data. Call them after the table has initialized and ensure the supplied rowId exists on the current page.
check(rowIds)
Selects rows on the current page whose IDs match rowIds.
| Parameter | Description | Type |
|---|---|---|
| rowIds | IDs of rows to select | String[] |
Returns void.
unCheck(rowIds)
Deselects rows on the current page whose IDs match rowIds.
| Parameter | Description | Type |
|---|---|---|
| rowIds | IDs of rows to deselect | String[] |
Returns void.
updateData(rowId, data)
Updates field values for the row matching rowId on the current page.
| Parameter | Description | Type |
|---|---|---|
| rowId | ID of the row to update | String |
| data | Object containing field values to update | Object |
Returns void.
