mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Removed package "autobind-decorator" and @boundMethod in favour of "auto-bind" util for constructors-only. (#5218)
This commit is contained in:
1 parent
5f145e69e5
commit
06e7dfce5e
45 files changed
+150
-180
No files matched your search
@@ -14,7 +14,7 @@ import { ConfirmDialog } from "../confirm-dialog";
|
||||
import type { TableCellProps, TableProps, TableRowProps, TableSortCallbacks } from "../table";
|
||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||
import type { IClassName } from "../../utils";
|
||||
import { boundMethod, cssNames, isReactNode, prevDefault, stopPropagation } from "../../utils";
|
||||
import { autoBind, cssNames, isReactNode, prevDefault, stopPropagation } from "../../utils";
|
||||
import type { AddRemoveButtonsProps } from "../add-remove-buttons";
|
||||
import { AddRemoveButtons } from "../add-remove-buttons";
|
||||
import { NoItems } from "../no-items";
|
||||
@@ -68,13 +68,13 @@ export class ItemListLayoutContent<I extends ItemObject> extends React.Component
|
||||
constructor(props: ItemListLayoutContentProps<I>) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
autoBind(this);
|
||||
}
|
||||
|
||||
@computed get failedToLoad() {
|
||||
return this.props.store.failedLoading;
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
renderRow(item: I) {
|
||||
return this.getTableRow(item);
|
||||
}
|
||||
@@ -133,7 +133,6 @@ export class ItemListLayoutContent<I extends ItemObject> extends React.Component
|
||||
);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
getRow(uid: string) {
|
||||
return (
|
||||
<div key={uid}>
|
||||
@@ -150,7 +149,6 @@ export class ItemListLayoutContent<I extends ItemObject> extends React.Component
|
||||
);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
removeItemsDialog(selectedItems: I[]) {
|
||||
const { customizeRemoveDialog, store } = this.props;
|
||||
const visibleMaxNamesCount = 5;
|
||||
|
||||
@@ -11,7 +11,7 @@ import { computed, makeObservable, untracked } from "mobx";
|
||||
import type { ConfirmDialogParams } from "../confirm-dialog";
|
||||
import type { TableCellProps, TableProps, TableRowProps, TableSortCallbacks } from "../table";
|
||||
import type { IClassName, StorageHelper } from "../../utils";
|
||||
import { boundMethod, cssNames, noop } from "../../utils";
|
||||
import { autoBind, cssNames, noop } from "../../utils";
|
||||
import type { AddRemoveButtonsProps } from "../add-remove-buttons";
|
||||
import type { ItemObject, ItemStore } from "../../../common/item.store";
|
||||
import type { SearchInputUrlProps } from "../input";
|
||||
@@ -120,6 +120,7 @@ class NonInjectedItemListLayout<I extends ItemObject> extends React.Component<It
|
||||
constructor(props: ItemListLayoutProps<I> & Dependencies) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
autoBind(this);
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
@@ -160,7 +161,6 @@ class NonInjectedItemListLayout<I extends ItemObject> extends React.Component<It
|
||||
return activeFilters;
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
toggleFilters() {
|
||||
this.showFilters = !this.showFilters;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user