mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
migration additions -- part 3 (adding makeObservable to constructor)
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
95794af5b2
commit
08787dce1f
139 files changed
+732
-147
No files matched your search
@@ -1,6 +1,6 @@
|
||||
|
||||
import "./command-container.scss";
|
||||
import { action, observable } from "mobx";
|
||||
import { action, observable, makeObservable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import React from "react";
|
||||
import { Dialog } from "../dialog";
|
||||
@@ -29,6 +29,11 @@ export class CommandOverlay {
|
||||
export class CommandContainer extends React.Component<{ clusterId?: string }> {
|
||||
@observable.ref commandComponent: React.ReactElement;
|
||||
|
||||
constructor(props: { clusterId?: string }) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
private escHandler(event: KeyboardEvent) {
|
||||
if (event.key === "Escape") {
|
||||
event.stopPropagation();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { Select } from "../select";
|
||||
import { computed, observable, toJS } from "mobx";
|
||||
import { computed, observable, toJS, makeObservable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import React from "react";
|
||||
import { commandRegistry } from "../../../extensions/registries/command-registry";
|
||||
@@ -14,6 +14,11 @@ import { clusterViewURL } from "../cluster-manager/cluster-view.route";
|
||||
export class CommandDialog extends React.Component {
|
||||
@observable menuIsOpen = true;
|
||||
|
||||
constructor(props: object) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
@computed get options() {
|
||||
const context = {
|
||||
entity: commandRegistry.activeEntity
|
||||
|
||||
Reference in new issue
Block a user