|
21 | 21 | * <li>.filterCategoriesPlaceholder - (String) Text to display in `complex-select` category value select when no filter value has been entered, Optional
|
22 | 22 | * <li>.filterDelimiter - (String) Delimiter separating 'complex-select' category and value. Optional, default is a space, ' '
|
23 | 23 | * </ul>
|
| 24 | + * <li>.inlineResults - (Boolean) Flag to show results inline with the filter selection (default: false) |
24 | 25 | * <li>.appliedFilters - (Array) List of the currently applied filters
|
25 | 26 | * <li>.resultsCount - (int) The number of results returned after the current applied filters have been applied
|
| 27 | + * <li>.totalCount - (int) The total number of items before any filters have been applied. The 'm' in the label: 'n' of 'm' selected |
| 28 | + * <li>.showTotalCountResults - (Boolean) Optional, flag to show the total count in the filter results as well (ie. 'n' of 'm' Results) |
| 29 | + * <li>.itemsLabel - (String) Optional label to use for the items in the results count (default: Result) |
| 30 | + * <li>.itemsLabelPlural - (String) Optional label to use for the items in the resuults count when plural (default: Results) |
26 | 31 | * <li>.onFilterChange - ( function(array of filters) ) Function to call when the applied filters list changes
|
27 | 32 | * </ul>
|
28 | 33 | *
|
|
34 | 39 | <pf-filter id="exampleFilter" config="filterConfig"></pf-filter>
|
35 | 40 | </div>
|
36 | 41 | <hr class="col-md-12">
|
| 42 | + </br></br> |
| 43 | + <div class="col-sm-4"> |
| 44 | + <form role="form"> |
| 45 | + <div class="form-group"> |
| 46 | + <label class="checkbox-inline"> |
| 47 | + <input type="checkbox" ng-model="filterConfig.inlineResults">Inline results</input> |
| 48 | + </label> |
| 49 | + </div> |
| 50 | + </form> |
| 51 | + </div> |
| 52 | + <div class="col-sm-4"> |
| 53 | + <form role="form"> |
| 54 | + <div class="form-group"> |
| 55 | + <label class="checkbox-inline"> |
| 56 | + <input type="checkbox" ng-model="filterConfig.showTotalCountResults">Show total count in results</input> |
| 57 | + </label> |
| 58 | + </div> |
| 59 | + </form> |
| 60 | + </div> |
| 61 | + <hr class="col-md-12"> |
37 | 62 | <div class="col-md-12">
|
38 | 63 | <label class="events-label">Valid Items: </label>
|
39 | 64 | </div>
|
|
55 | 80 | </div>
|
56 | 81 | </div>
|
57 | 82 | </div>
|
58 |
| - </br></br> |
59 | 83 | <div class="col-md-12">
|
60 | 84 | <label class="events-label">Current Filters: </label>
|
61 | 85 | </div>
|
|
206 | 230 | }
|
207 | 231 | ],
|
208 | 232 | resultsCount: $scope.items.length,
|
| 233 | + totalCount: $scope.allItems.length, |
209 | 234 | appliedFilters: [],
|
210 | 235 | onFilterChange: filterChange
|
211 | 236 | };
|
|
0 commit comments