mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
remove console log, display ?? when loading
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
83e6fce18e
commit
c873103073
@ -57,7 +57,6 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
|
|||||||
|
|
||||||
@action
|
@action
|
||||||
async loadAll(namespaces: string[]) {
|
async loadAll(namespaces: string[]) {
|
||||||
console.log("reloading releases", namespaces);
|
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.isLoaded = false;
|
this.isLoaded = false;
|
||||||
|
|
||||||
|
|||||||
@ -285,6 +285,11 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@autobind()
|
||||||
|
toggleFilters() {
|
||||||
|
this.showFilters = !this.showFilters;
|
||||||
|
}
|
||||||
|
|
||||||
renderFilters() {
|
renderFilters() {
|
||||||
const { hideFilters } = this.props;
|
const { hideFilters } = this.props;
|
||||||
const { isReady, filters } = this;
|
const { isReady, filters } = this;
|
||||||
@ -337,7 +342,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
|||||||
<>
|
<>
|
||||||
{title}
|
{title}
|
||||||
<div className="info-panel box grow">
|
<div className="info-panel box grow">
|
||||||
{this.isReady && info}
|
{info}
|
||||||
</div>
|
</div>
|
||||||
{filters}
|
{filters}
|
||||||
{isSearchable && searchFilters && search}
|
{isSearchable && searchFilters && search}
|
||||||
@ -349,13 +354,14 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
|||||||
const { items, isReady, filters } = this;
|
const { items, isReady, filters } = this;
|
||||||
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;
|
|
||||||
|
|
||||||
if (isFiltered) {
|
if (!isReady) {
|
||||||
const toggleFilters = () => this.showFilters = !this.showFilters;
|
return "?? items";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filters.length > 0) {
|
||||||
return (
|
return (
|
||||||
<><a onClick={toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount}</>
|
<><a onClick={this.toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount}</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user