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)),
|
||||
}),
|
||||
reaction(() => clusterContext.contextNamespaces.length, () => {
|
||||
reaction(() => clusterContext.contextNamespaces.slice(), () => {
|
||||
// clear load errors
|
||||
this.loadErrors.length = 0;
|
||||
}),
|
||||
@ -90,11 +90,12 @@ export class WorkloadsOverview extends React.Component<Props> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const items = WorkloadsOverviewDetailRegistry.getInstance().getItems().map((item, index) => {
|
||||
return (
|
||||
<item.components.Details key={`workload-overview-${index}`}/>
|
||||
);
|
||||
});
|
||||
const items = WorkloadsOverviewDetailRegistry
|
||||
.getInstance()
|
||||
.getItems()
|
||||
.map(({ components: { Details }}, index) => (
|
||||
<Details key={`workload-overview-${index}`}/>
|
||||
));
|
||||
|
||||
return (
|
||||
<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 stores = Array.from(new Set([store, ...dependentStores]));
|
||||
const reactions: Disposer[] = [
|
||||
reaction(() => clusterContext.contextNamespaces.length, () => {
|
||||
reaction(() => clusterContext.contextNamespaces.slice(), () => {
|
||||
// clear load errors
|
||||
this.loadErrors.length = 0;
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user