Constructor
new FilterRefineByItem(filterTreeType)
Creates a new FilterRefineByItem
Parameters:
Name | Type | Description |
---|---|---|
filterTreeType |
FilterTreeEnum | 'vertical' or 'horizontal' |
Methods
buildLabel() → {string}
Build label for refine by item.
It gets the label from filterItem.label, except for some cases (Rating, Range)
Returns:
- Type
- string
buildLabelMultiLevel() → {string}
Build refine by label for filter by multi level tag
Returns:
- Formatted label
- Type
- string
buildLabelRange() → {string}
Build special refine by label for filter by range
Returns:
- Formatted label
- Type
- string
buildLabelRating() → {string}
Build special refine by label for filter by rating
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'
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 |