Skip to content

Commit

Permalink
Ensure any existing helm chart repo filter is shown in header on nav (#…
Browse files Browse the repository at this point in the history
…4756)

- fixes #4755
  • Loading branch information
richard-cox authored Nov 9, 2020
1 parent bf4dce4 commit 06295a3
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { helmEntityCatalog } from '../../helm-entity-catalog';
import { HELM_ENDPOINT_TYPE, HELM_HUB_ENDPOINT_TYPE } from '../../helm-entity-factory';
import { MonocularChartsListConfig } from '../../list-types/monocular-charts-list-config.service';

const REPO_FILTER_NAME = 'repository';

@Component({
selector: 'app-catalog-tab',
templateUrl: './catalog-tab.component.html',
Expand Down Expand Up @@ -86,6 +88,12 @@ export class CatalogTabComponent {
}),
startWith(null)
);

helmEntityCatalog.chart.store.getPaginationMonitor().pagination$.pipe(
first()
).subscribe(pagination => {
this.filteredRepo = pagination.clientPagination?.filter?.items?.[REPO_FILTER_NAME];
});
}

/**
Expand All @@ -99,7 +107,7 @@ export class CatalogTabComponent {
this.store.dispatch(new SetClientFilter(action, action.paginationKey, {
...pagination.clientPagination.filter,
items: {
repository: repoName,
[REPO_FILTER_NAME]: repoName,
},
}));
});
Expand Down

0 comments on commit 06295a3

Please sign in to comment.