mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
c134d322a9
commit
62f9172403
1 file changed
+2
-3
@@ -342,17 +342,16 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
|||||||
const allItemsCount = this.props.store.getTotalCount();
|
const allItemsCount = this.props.store.getTotalCount();
|
||||||
const itemsCount = items.length;
|
const itemsCount = items.length;
|
||||||
const isFiltered = isReady && filters.length > 0;
|
const isFiltered = isReady && filters.length > 0;
|
||||||
const RefreshIcon = <Icon material="update" small={true} onClick={() => this.loadStores()} />;
|
|
||||||
|
|
||||||
if (isFiltered) {
|
if (isFiltered) {
|
||||||
const toggleFilters = () => userSettings.showAppliedFilters = !userSettings.showAppliedFilters;
|
const toggleFilters = () => userSettings.showAppliedFilters = !userSettings.showAppliedFilters;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<><a onClick={toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount} {RefreshIcon}</>
|
<><a onClick={toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount}</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return allItemsCount <= 1 ? <>{allItemsCount} item {RefreshIcon}</> : <>{allItemsCount} items {RefreshIcon}</>;
|
return allItemsCount <= 1 ? `${allItemsCount} item` : `${allItemsCount} items`;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderHeader() {
|
renderHeader() {
|
||||||
|
|||||||
Reference in new issue
Block a user