Skip to content

Hides selected filter results unless selected&totalCount !== undefined #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

AllenBW
Copy link
Contributor

@AllenBW AllenBW commented Jun 6, 2017

Unless selectedcount and total count are explicitly defined, will not display the "x of x selected" filter results text. Prevents unwanted text for instance, when there is no items to select

This changes behavior from being shown by default, to being shown when explicitly invoked, aligns closer with pf 3.x behavior

closes #480

Unless selectedcount and total count are explicitly defined, will not display the "x of x selected" filter results text.  Prevents unwanted text for instance, when there is no items to select
@@ -12,7 +12,7 @@
</li>
</ul>
<p><a class="clear-filters" ng-click="$ctrl.clearAllFilters()" ng-if="$ctrl.config.appliedFilters.length > 0">Clear All Filters</a></p>
<div ng-if="$ctrl.config.totalCount !== 0" class="pf-table-view-selected-label">
<div ng-if="$ctrl.config.selectedCount !== undefined && $ctrl.config.totalCount !== undefined" class="pf-table-view-selected-label">
<strong>{{$ctrl.config.selectedCount}}</strong> of <strong>{{$ctrl.config.totalCount}}</strong> selected
Copy link
Member

@dtaylor113 dtaylor113 Jun 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi could you please add a unit test for this?
angular-patternfly/test/views/listview/list-view.spec.js
Thanks,
Dave

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dtaylor113 would it make more sense to add the tests angular-patternflytest/filters/filter.spec.js? (sure as crap is easier 😆 )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that would be fine. I just didn't see any 'selection' type tests in filter.spec, but there are some in list-view.spec. Whatever's easier is fine. -thanks

@jeff-phillips-18 jeff-phillips-18 merged commit b828a11 into patternfly:master Jun 8, 2017
@AllenBW AllenBW deleted the bug/480-incorrectly-showing-filter-selected-results branch June 8, 2017 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When no items can be selected we still display the "x of x results" text in the filter results
3 participants