mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: HotBar's icon context menu items non-observable (no "disconnect cluster", etc.)
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
01968505e7
commit
7476bf9728
1 file changed
+7
-2
@@ -1,7 +1,7 @@
|
|||||||
import "./hotbar-icon.scss";
|
import "./hotbar-icon.scss";
|
||||||
|
|
||||||
import React, { DOMAttributes } from "react";
|
import React, { DOMAttributes } from "react";
|
||||||
import { observable } from "mobx";
|
import { makeObservable, observable } from "mobx";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import randomColor from "randomcolor";
|
import randomColor from "randomcolor";
|
||||||
|
|
||||||
@@ -23,7 +23,12 @@ interface Props extends DOMAttributes<HTMLElement> {
|
|||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class HotbarEntityIcon extends React.Component<Props> {
|
export class HotbarEntityIcon extends React.Component<Props> {
|
||||||
@observable.deep private contextMenu: CatalogEntityContextMenuContext;
|
@observable private contextMenu: CatalogEntityContextMenuContext;
|
||||||
|
|
||||||
|
constructor(props: Props) {
|
||||||
|
super(props);
|
||||||
|
makeObservable(this);
|
||||||
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.contextMenu = {
|
this.contextMenu = {
|
||||||
|
|||||||
Reference in new issue
Block a user