Class: FilterClearButton

FilterClearButton(filterTreeType, clearType)

Filter clear button

Constructor

new FilterClearButton(filterTreeType, clearType)

Creates new FilterClearButton
Parameters:
Name Type Description
filterTreeType FilterTreeEnum 'vertical' or 'horizontal'
clearType ClearType clear type 'clear-single-value', 'clear-option-values', 'clear-all'
Source:

Members

(static) ClearType

Get the clear button types enum
Source:

Methods

getTemplate() → {string}

Get the clear button's html template. Depending on its clearType, it returns different templates
Source:
Returns:
Raw html template
Type
string

isVisible() → {boolean}

Check if the clear button is visible. For example, if there are no selected filter items, clear all button won't be visible.
Source:
Returns:
Type
boolean

onClearAll()

Clear all values of the filter This button is a child of a FilterTree component Calls API.
Source:

onClearOptionValues()

Clear all values of one filter options This button is a child of a FilterOption component FilterOption component has filterOptionId field, to know which values to clear. Calls API.
Source:

onClearSingleValue()

Clears single filter value This clear button is a child of the RefineByItem component, RefineByItem component has filterOptionId and filterItemId fields, to know which value to clear. Calls API
Source:

onClick(event)

On click the clear button calls onClearSingleValue, or onClearOptionValues, or onClearAll depending on clear type
Parameters:
Name Type Description
event
Source:

onDeselectOptionValues()

Deselects all filter option item in a filter option Don't call API.
Source: