diff --git a/components/table/demo/edit-cell.md b/components/table/demo/edit-cell.md index 2f0e24338b..e2aafbe974 100644 --- a/components/table/demo/edit-cell.md +++ b/components/table/demo/edit-cell.md @@ -91,7 +91,7 @@ class EditableTable extends React.Component { return ( this.state.dataSource.length > 1 ? ( - + this.onDelete(index)}> Delete ) : null @@ -122,11 +122,9 @@ class EditableTable extends React.Component { }; } onDelete = (index) => { - return () => { - const dataSource = [...this.state.dataSource]; - dataSource.splice(index, 1); - this.setState({ dataSource }); - }; + const dataSource = [...this.state.dataSource]; + dataSource.splice(index, 1); + this.setState({ dataSource }); } handleAdd = () => { const { count, dataSource } = this.state;