update demo

This commit is contained in:
yoyo837 2018-10-15 14:20:18 +08:00 committed by 偏右
parent 722b903118
commit 49f4fdf9b6
2 changed files with 4 additions and 2 deletions

View File

@ -211,8 +211,9 @@ class EditableTable extends React.Component {
}
return {
...col,
onCell: record => ({
onCell: (record, rowIndex) => ({
record,
rowIndex,
editable: col.editable,
dataIndex: col.dataIndex,
title: col.title,

View File

@ -186,8 +186,9 @@ class EditableTable extends React.Component {
}
return {
...col,
onCell: record => ({
onCell: (record, rowIndex) => ({
record,
rowIndex,
inputType: col.dataIndex === 'age' ? 'number' : 'text',
dataIndex: col.dataIndex,
title: col.title,