| | |
| | | |
| | | class EditableCell extends Component { |
| | | getInput = (form) => { |
| | | const { inputType, options, min, max, unlimit } = this.props |
| | | const { inputType, options, min, max, unlimit, allowClear } = this.props |
| | | |
| | | if (inputType === 'number' && unlimit) { |
| | | return <InputNumber onPressEnter={() => this.getValue(form)} /> |
| | | } else if (inputType === 'number') { |
| | | return <InputNumber min={min} max={max} precision={0} onPressEnter={() => this.getValue(form)} /> |
| | | } else if (inputType === 'color') { |
| | | return <ColorSketch /> |
| | | return <ColorSketch allowClear={allowClear}/> |
| | | } else if (inputType === 'icon') { |
| | | return <MkEditIcon allowClear/> |
| | | } else if (inputType === 'select') { |
| | |
| | | unlimit: col.unlimit, |
| | | required: col.required !== false ? true : false, |
| | | title: col.title, |
| | | allowClear: col.allowClear === true, |
| | | editing: this.isEditing(record), |
| | | onSave: this.execSave, |
| | | }), |