From e43961ec4f721446479d3aa65593ad0d920481b7 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Tue, 27 Jul 2021 20:12:25 +0300 Subject: [PATCH] fix crd resources watch issue (#3520) Signed-off-by: Jari Kolehmainen --- .../+custom-resources/crd-resources.tsx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/renderer/components/+custom-resources/crd-resources.tsx b/src/renderer/components/+custom-resources/crd-resources.tsx index 6042b82027..be12f910c1 100644 --- a/src/renderer/components/+custom-resources/crd-resources.tsx +++ b/src/renderer/components/+custom-resources/crd-resources.tsx @@ -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 { 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 { return (