Quick filter component
Use the Quick filter component to filter data by custom conditions, date/time, or lookup values. Before you use the component, make sure that the viewModelConfig schema section includes the attribute bound to the Quick filter component.
View the example that adds an attribute to the Freedom UI page schema below.
{
"viewModelConfig": {
"attributes": {
"My_QuickFilter_Value": {
"value": null
},
"My_Converter_Arg": {
"value": {
"quickFilterType": "lookup",
"target": {
"viewAttributeName": "Items",
"filterColumn": "Category"
}
}
},
"My_Filter": {
"from": "My_QuickFilter_Value",
"converter": "crt.QuickFilterAttributeConverter : \$My_Converter_Arg"
},
"Items": {
"modelConfig": {
"path": "PDS",
"filterAttributes": [
{
"loadOnChange": true,
"name": "My_Filter"
}
]
}
}
}
}
}
View the example of a configuration object that filters the lookup values below.
{
"name": "My_QuickFilter",
"type": "crt.QuickFilter",
"filterType": "lookup",
"config": {
"caption": "Select category",
"icon": "person-button-icon",
"iconPosition": "left-icon",
"entitySchemaName": "AccountCategory"
}
}
Once you select a filter value, Creatio Mobile stores it to the attribute whose name is QuickFilterCaption_Value. For this example, My_QuickFilter_Value.
View the example of a configuration object that filters data by custom condition below.
{
"name": "QuickFilter_Custom",
"type": "crt.QuickFilter",
"config": {
"caption": "Show drafts",
"defaultValue": true,
"approachState": true
},
"filterType": "custom"
}
string type
Component type. crt.QuickFilter for the Quick filter component.
string filterType
Type of quick filter.
Available values
lookup | Filter that filters the lookup values. |
date-range | Filter that filters the date/time values. |
custom | Filter that filters data by custom conditions. |
object config
Parameters of quick filter.
Parameters
Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
string caption | Required | Title of the quick filter. Creatio Mobile displays title if no value is selected. | ||||||||||||||||
string icon | Required | Icon of the quick filter. The property is supported by the | ||||||||||||||||
string iconPosition | Required | Position of the icon relative to the quick filter caption. By default, only-text Do not display the icon. Display only the quick filter caption. left-icon Display the icon to the left of the quick filter caption. right-icon Display the icon to the right of the quick filter caption. only-icon Display only the icon. Do not display the quick filter caption. | ||||||||||||||||
string defaultValue | Optional | Out-of-the-box value of quick filter. Parameters of the Name Type Description string start Required Column that stores out-of-the-box start date of quick filter. string end Required Column that stores out-of-the-box end date of quick filter. string macros Required Macro that determines out-of-the-box time interval of quick filter. For example, Available values of the true Out of the box, quick filter is enabled. Default value. false Out of the box, quick filter is disabled. | ||||||||||||||||
string entitySchemaName | Required | Entity schema whose data is displayed in the quick filter of the | ||||||||||||||||
string recordsFilter | Optional | Filter to filter lookup values. | ||||||||||||||||
string cacheConfig | Optional | Manages caching of lookup values. | ||||||||||||||||
boolean approachState | Optional | The flag that specifies whether the quick filter of the true The quick filter is not reversible. false The quick filter is reversible. |