mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix crd resources watch issue (#3520)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
1b11433bca
commit
e43961ec4f
@ -23,11 +23,11 @@ import "./crd-resources.scss";
|
||||
|
||||
import React from "react";
|
||||
import jsonPath from "jsonpath";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { RouteComponentProps } from "react-router";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
import type { KubeObject } from "../../api/kube-object";
|
||||
import { autorun, computed, makeObservable } from "mobx";
|
||||
import { computed, makeObservable } from "mobx";
|
||||
import { crdStore } from "./crd.store";
|
||||
import type { TableSortCallbacks } from "../table";
|
||||
import { apiManager } from "../../api/api-manager";
|
||||
@ -50,18 +50,6 @@ export class CrdResources extends React.Component<Props> {
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
disposeOnUnmount(this, [
|
||||
autorun(() => {
|
||||
const { store } = this;
|
||||
|
||||
if (store && !store.isLoading && !store.isLoaded) {
|
||||
store.reloadAll();
|
||||
}
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
@computed get crd() {
|
||||
const { group, name } = this.props.match.params;
|
||||
|
||||
@ -93,6 +81,7 @@ export class CrdResources extends React.Component<Props> {
|
||||
return (
|
||||
<KubeObjectListLayout
|
||||
isConfigurable
|
||||
key={`crd_resources_${crd.getResourceApiBase()}`}
|
||||
tableId="crd_resources"
|
||||
className="CrdResources"
|
||||
store={store}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user