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
@@ -11,7 +11,7 @@ import React from "react";
|
||||
import { Icon } from "../icon";
|
||||
import type { InputProps, InputValidator } from "../input";
|
||||
import { Input } from "../input";
|
||||
import { boundMethod } from "../../utils";
|
||||
import { autoBind } from "../../utils";
|
||||
|
||||
export interface EditableListProps<T> {
|
||||
items: T[];
|
||||
@@ -36,7 +36,11 @@ const defaultProps: Partial<EditableListProps<any>> = {
|
||||
export class EditableList<T> extends React.Component<EditableListProps<T>> {
|
||||
static defaultProps = defaultProps as EditableListProps<any>;
|
||||
|
||||
@boundMethod
|
||||
constructor(props: EditableListProps<T>) {
|
||||
super(props);
|
||||
autoBind(this);
|
||||
}
|
||||
|
||||
onSubmit(val: string, evt: React.KeyboardEvent) {
|
||||
if (val) {
|
||||
evt.preventDefault();
|
||||
|
||||
Reference in new issue
Block a user