Removed package "autobind-decorator" and @boundMethod in favour of "auto-bind" util for constructors-only. (#5218)

This commit is contained in:
Roman authored and GitHub committed 2022-04-07 17:21:54 +03:00
1 parent 5f145e69e5
commit 06e7dfce5e
45 files changed
+150 -180

No files matched your search

@@ -4,7 +4,7 @@
*/
import React from "react";
import { boundMethod, cssNames } from "../../utils";
import { autoBind, cssNames } from "../../utils";
import type { PortForwardItem, PortForwardStore } from "../../port-forward";
import { openPortForward } from "../../port-forward";
import type { MenuActionsProps } from "../menu/menu-actions";
@@ -26,8 +26,12 @@ interface Dependencies {
openPortForwardDialog: (item: PortForwardItem) => void;
}
class NonInjectedPortForwardMenu extends React.Component<PortForwardMenuProps & Dependencies> {
@boundMethod
class NonInjectedPortForwardMenu<Props extends PortForwardMenuProps & Dependencies> extends React.Component<Props> {
constructor(props: Props) {
super(props);
autoBind(this);
}
remove() {
const { portForward } = this.props;