diff --git a/src/routes/Forms/TableForm.js b/src/routes/Forms/TableForm.js index 12c7afbdbed8fb300432561650aae9f88edcc1bf..d5494267b06d8271743221b71b6380b7f911fedf 100644 --- a/src/routes/Forms/TableForm.js +++ b/src/routes/Forms/TableForm.js @@ -1,4 +1,6 @@ import React, { PureComponent } from 'react'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; import { Table, Button, Input, message, Popconfirm, Divider } from 'antd'; import styles from './style.less'; @@ -33,6 +35,8 @@ export default class TableForm extends PureComponent { } }); } + @Bind() + @Debounce(400) toggleEditable(e, key) { e.preventDefault(); const newData = this.state.data.map(item => ({ ...item }));