mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix strangeness when switching between single namespaces
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
c9e0967650
commit
7a71127d3c
@ -61,7 +61,7 @@ export class WorkloadsOverview extends React.Component<Props> {
|
|||||||
], {
|
], {
|
||||||
onLoadFailure: error => this.loadErrors.push(String(error)),
|
onLoadFailure: error => this.loadErrors.push(String(error)),
|
||||||
}),
|
}),
|
||||||
reaction(() => clusterContext.contextNamespaces.length, () => {
|
reaction(() => clusterContext.contextNamespaces.slice(), () => {
|
||||||
// clear load errors
|
// clear load errors
|
||||||
this.loadErrors.length = 0;
|
this.loadErrors.length = 0;
|
||||||
}),
|
}),
|
||||||
@ -90,11 +90,12 @@ export class WorkloadsOverview extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const items = WorkloadsOverviewDetailRegistry.getInstance().getItems().map((item, index) => {
|
const items = WorkloadsOverviewDetailRegistry
|
||||||
return (
|
.getInstance()
|
||||||
<item.components.Details key={`workload-overview-${index}`}/>
|
.getItems()
|
||||||
);
|
.map(({ components: { Details }}, index) => (
|
||||||
});
|
<Details key={`workload-overview-${index}`}/>
|
||||||
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="WorkloadsOverview flex column gaps">
|
<div className="WorkloadsOverview flex column gaps">
|
||||||
|
|||||||
@ -67,7 +67,7 @@ export class KubeObjectListLayout<K extends KubeObject> extends React.Component<
|
|||||||
const { store, dependentStores = [], subscribeStores } = this.props;
|
const { store, dependentStores = [], subscribeStores } = this.props;
|
||||||
const stores = Array.from(new Set([store, ...dependentStores]));
|
const stores = Array.from(new Set([store, ...dependentStores]));
|
||||||
const reactions: Disposer[] = [
|
const reactions: Disposer[] = [
|
||||||
reaction(() => clusterContext.contextNamespaces.length, () => {
|
reaction(() => clusterContext.contextNamespaces.slice(), () => {
|
||||||
// clear load errors
|
// clear load errors
|
||||||
this.loadErrors.length = 0;
|
this.loadErrors.length = 0;
|
||||||
}),
|
}),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user