CaFilterMultiTreeView
Multi choice tree view filter
SASS-path: ./styles/components/molecules/ca-filter-multi-tree-view.scss
Props
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
| values | The selectable values | Array | true | - |
| selection | The current selection | Array | true | - |
| displayTreeView | Should it load tree view by default? | Boolean | false | false |
Events
| Event Name | Description | Parameters |
|---|---|---|
| selectionchange | - | - |
Methods
| Method | Description | Parameters |
|---|---|---|
| sortByOrder | Orders the data by its order prop | data (Array) |
| filterProducts | Filter the prodcuts and emit the selection | children (Array), facetId (String), label (String), Selected (Boolean), parentId (String) |
| pushSelection | Push the selected filters | facetId (String), itemLabel (string) |
| selectChildrenCategories | Select the children when a parent is selected | array (Array) |
| removeChildrenCategories | Remove the children when a parent is deselected | array (Array) |
| removeSelection | Remove selected filters | facetId (String) |
| removeParentCategories | Find the parents of the child category and deselct them | facetId (String), parentId (string) |
Computed
| Computed | Type | Description | From Store |
|---|---|---|---|
| valuesWithSelected | Array | Adds selected property to the values returned from the api | No |
| valuesWithChildren | Array | Adds children properties created from child categories with parentId | No |