This widget can be used to provide a summary of filters applied to a filtered list.
Although this widget can be used independently it is typically rendered by configuring the
showFilterSummary attribute on a
filtered list.
- Since:
- 1.0.54
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
Members
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/FilterSummary.css"}]
- Source:
-
i18nRequirements :object[]
-
An array of the i18n files to use with this widget.
Type:
- object[]
- Default Value:
- [{i18nFile: "./i18n/FilterSummary.properties"}]
- Source:
-
label :string
-
A label to prefix the summary with.
Type:
- string
- Default Value:
- "filter-summary.label"
- Source:
-
labelMapping :object
-
This is an optional map of filter values to labels. The map should have filter name attributes that are mapped to a sub-map of values to labels, e.g.
Type:
- object
- Since:
- 1.0.84
- Default Value:
- null
- Source:
Example
labelMapping: { name: { ted: "Edward", bob: "Robert" }, age: { 10: "Ten", 20: "Twenty" } }
-
templateString :string
-
The HTML template to use for the widget.
Type:
- string
- Source:
-
widgetsForActions :object[]
-
A widget model of widgets for performing actions. By default a single link is defined for clearing all choices.
Type:
- object[]
- Source:
Methods
-
_getLabel(item) → {object}
-
Overrides the inherited function to retrieve the name from the filter to return as the label.
Parameters:
Name Type Description item
item The filter whose "name" attribute should be returned as the label - Source:
Returns:
An object representing the filter name.- Type
- object
-
_removeChoice(choiceToRemove)
-
This extends the inherited function to publish information about the filter removal.
Parameters:
Name Type Description choiceToRemove
object The choice removed. - Source:
Fires:
-
addActions(filters)
-
If one or more filter has been applied then the widgetsForActions will be created to provide a "Clear All" action.
Parameters:
Name Type Description filters
object[] An array of the filters that have been applied. - Source:
-
getNewChoiceTargetNode() → {object}
-
Overrides the inherited function to return the appropriate node to add choices to.
- Source:
Returns:
The DOM element to add choices relative to- Type
- object
-
getRootClassTargetNode() → {object}
-
Overrides the inherited function to return the appropriate node to set the root class on.
- Source:
Returns:
The target DOM element- Type
- object
-
onClearAllFilters(payload)
-
Called on requests to clear all the filters.
Parameters:
Name Type Description payload
object - Source:
-
onFiltersApplied(payload)
-
Called when the current filter data changes.
Parameters:
Name Type Description payload
object A payload containing the applied filters. - Source:
-
postCreate()
-
Sets up the subcription for handling filter changes.
- Source:
Listens to Events:
-
postMixInProperties()
-
Processes the label to ensure that it is localized.
- Source:
-
reset()
-
Resets the widget to its original state. Each choice is individually removed before all the actions widgets are destroyed.
- Source: