mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Resolve PR comments
- load errors now are paragraph spaced - The loading warning stays around when switching to all namespaces Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
373476fb03
commit
28b9e2cbc1
@ -60,7 +60,7 @@ interface KubeWatchPreloadOptions {
|
||||
|
||||
export interface KubeWatchSubscribeStoreOptions extends KubeWatchPreloadOptions {
|
||||
/**
|
||||
* Whether to subsribe only after loading all stores
|
||||
* Whether to subscribe only after loading all stores
|
||||
* @default true
|
||||
*/
|
||||
waitUntilLoaded?: boolean;
|
||||
|
||||
@ -66,7 +66,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, () => {
|
||||
reaction(() => clusterContext.contextNamespaces.length, () => {
|
||||
// clear load errors
|
||||
this.loadErrors.length = 0;
|
||||
}),
|
||||
@ -77,6 +77,7 @@ export class KubeObjectListLayout<K extends KubeObject> extends React.Component<
|
||||
kubeWatchApi.subscribeStores(stores, {
|
||||
preload: true,
|
||||
namespaces: clusterContext.contextNamespaces,
|
||||
onLoadFailure: error => this.loadErrors.push(error),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user