Class: FilterRefineByItem

FilterRefineByItem(filterTreeType)

A single refine by item It has a label and a clear button.

Constructor

new FilterRefineByItem(filterTreeType)

Creates a new FilterRefineByItem
Parameters:
Name Type Description
filterTreeType FilterTreeEnum 'vertical' or 'horizontal'
Source:

Methods

buildLabel() → {string}

Build label for refine by item. It gets the label from filterItem.label, except for some cases (Rating, Range)
Source:
Returns:
Type
string

buildLabelMultiLevel() → {string}

Build refine by label for filter by multi level tag
Source:
Returns:
- Formatted label
Type
string

buildLabelRange() → {string}

Build special refine by label for filter by range
Source:
Returns:
- Formatted label
Type
string

buildLabelRating() → {string}

Build special refine by label for filter by rating
Source:
Returns:
- Formatted label
Type
string

getTemplate() → {string}

Get the refine by item's html template. Depending on its filterTreeType, it returns different templates for 'vertical' and 'horizontal'
Source:
Returns:
Raw html template
Type
string

setData(filterOption, filterItem, filterItemKey)

Set data for refine by item.
Parameters:
Name Type Description
filterOption FilterOption currently selected filter option
filterItem FilterOptionItem currently selected filter option item
filterItemKey string the key of the above filter option item
Source: