API svyToolbarFilter v1
Last updated
Was this helpful?
Last updated
Was this helpful?
⇐
⇐
Creates a filter toolbar implementation using the custom list from the custom-rendered-components package.
This implementation expects an NG "Data Grid" table component and a "Custom List" component.
The filters offered from this implementation are generated from the table provided as follows:
any column with its filterType
property set to TEXT will be offered as a token popup, allowing the user to enter any number of Strings to match
any column with its filterType
property set to TEXT and the valuelist
will be offered as a lookup where the user can search for and select any number of values
any column with its filterType
property set to NUMBER will be offered as a number filter with a number of operators
any column with its filterType
property set to DATE will be offered as a date filter with a number of operators
You should create a toolbar filter instance at the onLoad of your form and assign it to a form variable.
Make sure to re-direct the onClick event of the "List Component" to the toolbar.onClick(entry, index, dataTarget, event);
Boolean
Clears all grid filters
RuntimeComponent
Returns the element used to display the filters
QBSelect
Applies all filters and returns the query for this toolbar
scopes.svySearch.SearchProvider
Returns the SearchProvider for the given column
column
[ 'CustomType' ].<aggrid-groupingtable.column>
String
Returns the search text for the simple search
scopes.svySearch.SimpleSearch
Returns the SimpleSearch
[ 'Array' ].<{id: String, dataprovider: String, operator: String, params: Object, text: String, values: Array}>
Returns the filters' state of the toolbar
Returns: [ 'Array' ].<{id: String, dataprovider: String, operator: String, params: Object, text: String, values: Array}>
- jsonState
Boolean
Returns true if the table has any column it can filter on
Called when the mouse is clicked on a list entry.
entry
object
index
Number
dataTarget
string
event
JSEvent
Restores the filters' state
jsonState
[ 'Array' ].<{id: String, dataprovider: String, operator: String, params: Object, text: String, values: Array}>
Applies all filters and executes the search
[searchText]
String
optional searchText to search for; if not provided here, call setSearchText() to set the search criteria before performing the search
autoApply
Boolean
Sets a filter value for the given column
column
[ 'CustomType' ].<aggrid-groupingtable.column>
values
Array
operator
String
Sets a callback method that is fired whenever a filter has been added
callback
function
Sets a callback method that is fired whenever the filter is applied The callback method receives an array of values, the operator and the filter as arguments
callback
function
Allows to provide a method that will be called when the filter for a specific column is created That method then can create and return any filter that will then be used for this column
callback
function
function that receives an aggrid-groupingtable Column as argument and must return a scopes.svyPopupFilter.AbstractPopupFilter
Sets a callback method that is fired whenever a filter is removed
callback
function
Set the onSearchCommand function to override the search behavior. You can add custom conditions to the filter query object;
callback
function
Example
Sets the search text for the simple search
Shows the filter picker popup
target
RuntimeComponent
Filter Toolbar implementation using the custom list from the custom-rendered-components package. This implementation requires a "List Component" element and an "Data-Grid" element. You should create a toolbar filter instance at the onLoad of your form and assign it to a form variable. Make sure to re-direct the onClick event of the "List Component" to the toolbar.onClick(entry, index, dataTarget, event);
listComponent
RuntimeWebComponent.<customrenderedcomponents-customlist>
| RuntimeWebComponent.<customrenderedcomponents-customlist_abs>
table
RuntimeWebComponent.<aggrid-groupingtable>
| RuntimeWebComponent.<aggrid-groupingtable_abs>
Example
Creates a filter toolbar implementation using the custom list from the custom-rendered-components package.\
This implementation expects an NG "Data Grid" table component and a "Custom List" component.\
The filters offered from this implementation are generated from the table provided as follows:
any column with its filterType
property set to TEXT will be offered as a token popup, allowing the user to enter any number of Strings to match
any column with its filterType
property set to TEXT and the valuelist
will be offered as a lookup where the user can search for and select any number of values
any column with its filterType
property set to NUMBER will be offered as a number filter with a number of operators
any column with its filterType
property set to DATE will be offered as a date filter with a number of operators
You should create a toolbar filter instance at the onLoad of your form and assign it to a form variable.
Make sure to re-direct the onClick event of the "List Component" to the toolbar.onClick(entry, index, dataTarget, event);
listComponent
RuntimeWebComponent.<customrenderedcomponents-customlist>
| RuntimeWebComponent.<customrenderedcomponents-customlist_abs>
table
RuntimeWebComponent.<aggrid-groupingtable>
| RuntimeWebComponent.<aggrid-groupingtable_abs>
Example
formType
String
any of the FILTER_TYPES
form
RuntimeForm.<AbstractPopupFilter>
| RuntimeForm.<AbstractLookup>
the form to set
Date filter
Number filter
Select filter
Tokens filter
Extends:
⇐
⇒ Boolean
⇒ RuntimeComponent
⇒ QBSelect
⇒ scopes.svySearch.SearchProvider
⇒ String
⇒ scopes.svySearch.SimpleSearch
⇒ [ 'Array' ].<{id: String, dataprovider: String, operator: String, params: Object, text: String, values: Array}>
⇒ Boolean
⇒
⇒
⇒
⇒
⇒
⇒
⇒
Overrides:
Extends: