|
@@ -45,8 +45,9 @@ const EditableFormItem = ({
|
|
|
if (iRef.current.selectRef) {
|
|
if (iRef.current.selectRef) {
|
|
|
// select选择器相关
|
|
// select选择器相关
|
|
|
iRef.current.selectRef.current.focus()
|
|
iRef.current.selectRef.current.focus()
|
|
|
- } else if (iRef.current.cascadeRef) {
|
|
|
|
|
- iRef.current.cascadeRef.current.focus()
|
|
|
|
|
|
|
+ } else if (editCellType === 'cascader') {
|
|
|
|
|
+ return
|
|
|
|
|
+ // iRef.current.cascadeRef.current.focus()
|
|
|
} else {
|
|
} else {
|
|
|
iRef.current.focus()
|
|
iRef.current.focus()
|
|
|
}
|
|
}
|
|
@@ -127,8 +128,6 @@ const EditableFormItem = ({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const save = async e => {
|
|
const save = async e => {
|
|
|
- // console.log('失去焦点了', e)
|
|
|
|
|
- // console.log(e)
|
|
|
|
|
const { value, local = '' } = e.currentTarget
|
|
const { value, local = '' } = e.currentTarget
|
|
|
if (value === record || !value) {
|
|
if (value === record || !value) {
|
|
|
toggleEdit()
|
|
toggleEdit()
|
|
@@ -152,7 +151,6 @@ const EditableFormItem = ({
|
|
|
defaultValue={state.val}
|
|
defaultValue={state.val}
|
|
|
allowClear={false}
|
|
allowClear={false}
|
|
|
className="w-full"
|
|
className="w-full"
|
|
|
- autoFocus={true}
|
|
|
|
|
onChange={(value, local) => save({ currentTarget: { value, local } })}
|
|
onChange={(value, local) => save({ currentTarget: { value, local } })}
|
|
|
popupVisible={true}
|
|
popupVisible={true}
|
|
|
onBlur={save}
|
|
onBlur={save}
|