mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
Tree 的 editControls 失效问题修复
Change-Id: I7fb0385612c6eda45b386ba1dfbddac7bc37d47b
This commit is contained in:
parent
7359eb33fa
commit
f4f29995e1
@ -349,13 +349,18 @@ export class TreeSelector extends React.Component<
|
||||
|
||||
@autobind
|
||||
handleEdit(item: Option) {
|
||||
const labelField = this.props.labelField;
|
||||
this.setState({
|
||||
isEditing: true,
|
||||
isAdding: false,
|
||||
editingItem: item,
|
||||
inputValue: item[labelField]
|
||||
});
|
||||
const {bultinCUD, onEdit, labelField, options} = this.props;
|
||||
|
||||
if (!bultinCUD) {
|
||||
onEdit?.(item);
|
||||
} else {
|
||||
this.setState({
|
||||
isEditing: true,
|
||||
isAdding: false,
|
||||
editingItem: item,
|
||||
inputValue: item[labelField]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@autobind
|
||||
|
Loading…
Reference in New Issue
Block a user