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
|
||||
async loadAll(namespaces: string[]) {
|
||||
console.log("reloading releases", namespaces);
|
||||
this.isLoading = true;
|
||||
this.isLoaded = false;
|
||||
|
||||
|
||||
@ -285,6 +285,11 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
});
|
||||
}
|
||||
|
||||
@autobind()
|
||||
toggleFilters() {
|
||||
this.showFilters = !this.showFilters;
|
||||
}
|
||||
|
||||
renderFilters() {
|
||||
const { hideFilters } = this.props;
|
||||
const { isReady, filters } = this;
|
||||
@ -337,7 +342,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
<>
|
||||
{title}
|
||||
<div className="info-panel box grow">
|
||||
{this.isReady && info}
|
||||
{info}
|
||||
</div>
|
||||
{filters}
|
||||
{isSearchable && searchFilters && search}
|
||||
@ -349,13 +354,14 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
const { items, isReady, filters } = this;
|
||||
const allItemsCount = this.props.store.getTotalCount();
|
||||
const itemsCount = items.length;
|
||||
const isFiltered = isReady && filters.length > 0;
|
||||
|
||||
if (isFiltered) {
|
||||
const toggleFilters = () => this.showFilters = !this.showFilters;
|
||||
if (!isReady) {
|
||||
return "?? items";
|
||||
}
|
||||
|
||||
if (filters.length > 0) {
|
||||
return (
|
||||
<><a onClick={toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount}</>
|
||||
<><a onClick={this.toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount}</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user