diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index 0e7e9ec4c9..7c1fe72ff7 100755 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -3192,7 +3192,6 @@ exports[`renders ./components/table/demo/edit-cell.md correctly 1`] = ` >
32 London Park no. 0 @@ -3456,7 +3451,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 1 @@ -3492,7 +3484,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 2 @@ -3528,7 +3517,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 3 @@ -3564,7 +3550,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 4 @@ -3600,7 +3583,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 5 @@ -3636,7 +3616,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 6 @@ -3672,7 +3649,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 7 @@ -3708,7 +3682,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 8 @@ -3744,7 +3715,6 @@ exports[`renders ./components/table/demo/edit-row.md correctly 1`] = ` > 32 London Park no. 9 diff --git a/components/table/demo/edit-cell.md b/components/table/demo/edit-cell.md index a516f28fea..117138d03d 100644 --- a/components/table/demo/edit-cell.md +++ b/components/table/demo/edit-cell.md @@ -211,9 +211,8 @@ class EditableTable extends React.Component { } return { ...col, - onCell: (record, rowIndex) => ({ + onCell: record => ({ record, - rowIndex, editable: col.editable, dataIndex: col.dataIndex, title: col.title, diff --git a/components/table/demo/edit-row.md b/components/table/demo/edit-row.md index 12cabf03e5..afdc9b33c6 100644 --- a/components/table/demo/edit-row.md +++ b/components/table/demo/edit-row.md @@ -186,9 +186,8 @@ class EditableTable extends React.Component { } return { ...col, - onCell: (record, rowIndex) => ({ + onCell: record => ({ record, - rowIndex, inputType: col.dataIndex === 'age' ? 'number' : 'text', dataIndex: col.dataIndex, title: col.title,