mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix detail views not watching child components (#4345)
* Fix detail views not watching child components - Add subscribeStores calls to all relavent details - Add support for tracking overlapping subscribes as an optimization Signed-off-by: Sebastian Malton <sebastian@malton.name> * Resolve PR comments Signed-off-by: Sebastian Malton <sebastian@malton.name> * Detect the adding of a namespace when selected namespaces change Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update debug log Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
8ff7c03993
commit
0286faf387
25 files changed
+338
-252
No files matched your search
@@ -22,13 +22,14 @@
|
||||
import "./kube-event-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { KubeObject } from "../../../common/k8s-api/kube-object";
|
||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
import { cssNames } from "../../utils";
|
||||
import { LocaleDate } from "../locale-date";
|
||||
import { eventStore } from "./event.store";
|
||||
import logger from "../../../common/logger";
|
||||
import { kubeWatchApi } from "../../../common/k8s-api/kube-watch-api";
|
||||
|
||||
export interface KubeEventDetailsProps {
|
||||
object: KubeObject;
|
||||
@@ -36,8 +37,12 @@ export interface KubeEventDetailsProps {
|
||||
|
||||
@observer
|
||||
export class KubeEventDetails extends React.Component<KubeEventDetailsProps> {
|
||||
async componentDidMount() {
|
||||
eventStore.reloadAll();
|
||||
componentDidMount() {
|
||||
disposeOnUnmount(this, [
|
||||
kubeWatchApi.subscribeStores([
|
||||
eventStore,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in new issue
Block a user