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

@@ -9,7 +9,7 @@ import { reaction } from "mobx";
import { disposeOnUnmount, observer } from "mobx-react";
import React from "react";
import type { RoleBinding, RoleBindingSubject } from "../../../../common/k8s-api/endpoints";
import { prevDefault, boundMethod } from "../../../utils";
import { prevDefault } from "../../../utils";
import { AddRemoveButtons } from "../../add-remove-buttons";
import { ConfirmDialog } from "../../confirm-dialog";
import { DrawerTitle } from "../../drawer";
@@ -36,8 +36,7 @@ export class RoleBindingDetails extends React.Component<RoleBindingDetailsProps>
]);
}
@boundMethod
removeSelectedSubjects() {
removeSelectedSubjects = () => {
const { object: roleBinding } = this.props;
const { selectedSubjects } = this;
@@ -48,7 +47,7 @@ export class RoleBindingDetails extends React.Component<RoleBindingDetailsProps>
<p>Remove selected bindings for <b>{roleBinding.getName()}</b>?</p>
),
});
}
};
render() {
const { selectedSubjects } = this;