File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 8484 <pf-list-view config="listConfig"
8585 page-config="pageConfig"
8686 items="items"
87- empty-state-config="emptyStateConfig">
87+ empty-state-config="items.length === 0 && filterConfig.appliedFilters.length > 0 ? noItemsConfig : emptyStateConfig">
8888 <div class="list-view-pf-description">
8989 <div class="list-group-item-heading">
9090 {{item.name}}
107107 <pf-card-view config="listConfig"
108108 page-config="pageConfig"
109109 items="items"
110- empty-state-config="emptyStateConfig">
110+ empty-state-config="items.length === 0 && filterConfig.appliedFilters.length > 0 ? noItemsConfig : emptyStateConfig">
111111 <div class="col-md-12">
112112 <span>{{item.name}}</span>
113113 </div>
124124 page-config="pageConfig"
125125 columns="columns"
126126 items="items"
127- empty-state-config="emptyStateConfig">
127+ empty-state-config="items.length === 0 && filterConfig.appliedFilters.length > 0 ? noItemsConfig : emptyStateConfig">
128128 </pf-table-view>
129129 </div>
130130 <hr class="col-md-12">
287287 }
288288 };
289289
290+ var clearFilters = function() {
291+ filterChange([]);
292+ $scope.filterConfig.appliedFilters = [];
293+ };
294+
290295 var filterChange = function (filters) {
291296 $scope.filtersText = "";
292297 filters.forEach(function (filter) {
488493 }
489494 };
490495
496+ $scope.noItemsConfig = {
497+ title: 'No Results Match the Filter Criteria',
498+ info: 'The active filters are hiding all items.',
499+ helpLink: {
500+ urlLabel: 'Clear All Filters',
501+ urlAction: clearFilters
502+ }
503+ };
504+
491505 $scope.tableConfig = {
492506 onCheckBoxChange: handleCheckBoxChange,
493507 selectionMatchProp: "name",
You can’t perform that action at this time.
0 commit comments