|
@@ -9,6 +9,7 @@ const EditableFormItem = ({ label, dataIndex, record, dataId, span, editCellType
|
|
|
const [editing, setEditing] = useState(false)
|
|
const [editing, setEditing] = useState(false)
|
|
|
const inputRef = useRef(null)
|
|
const inputRef = useRef(null)
|
|
|
const [val, setVal] = useState('')
|
|
const [val, setVal] = useState('')
|
|
|
|
|
+ const { Option } = Select
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
setVal('')
|
|
setVal('')
|
|
|
}, [])
|
|
}, [])
|
|
@@ -49,6 +50,10 @@ const EditableFormItem = ({ label, dataIndex, record, dataId, span, editCellType
|
|
|
toggleEdit()
|
|
toggleEdit()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ function handleSelectChange(value) {
|
|
|
|
|
+ console.log(`selected ${value}`)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// const handleOnChange = e => {
|
|
// const handleOnChange = e => {
|
|
|
// setVal(value)
|
|
// setVal(value)
|
|
|
// const { value = '' } = e.currentTarget
|
|
// const { value = '' } = e.currentTarget
|
|
@@ -65,9 +70,11 @@ const EditableFormItem = ({ label, dataIndex, record, dataId, span, editCellType
|
|
|
cell = (
|
|
cell = (
|
|
|
<Select
|
|
<Select
|
|
|
defaultValue="男"
|
|
defaultValue="男"
|
|
|
|
|
+ onBlur={save}
|
|
|
|
|
+ onChange={handleSelectChange}
|
|
|
>
|
|
>
|
|
|
- <option vlaue="男">男</option>
|
|
|
|
|
- <option vlaue="女">女</option>
|
|
|
|
|
|
|
+ <Option vlaue="男">男</Option>
|
|
|
|
|
+ <Option vlaue="女">女</Option>
|
|
|
</Select>
|
|
</Select>
|
|
|
)
|
|
)
|
|
|
break
|
|
break
|