> = (props) => {
const { editing, dataIndex, inputType, record, index, autoFocus, children, ...restProps } = props
const renderCell = (form: WrappedFormUtils) => (
{editing ? (
{form.getFieldDecorator(dataIndex, {
rules: [{ required: true, message: '不能为空' }],
initialValue: record[dataIndex],
valuePropName: inputType === 'checkbox' ? 'checked' : 'value'
})(renderInputControl(inputType, !!autoFocus))}
) : children}
|
)
return (
{renderCell}
)
}
export default EditableCell