|
|
@ -73,11 +73,12 @@ export class ListItem extends BI.BasicButton { |
|
|
|
action: () => { |
|
|
|
action: () => { |
|
|
|
const newName = this.nameEditor.getValue(); |
|
|
|
const newName = this.nameEditor.getValue(); |
|
|
|
this.store.changeName(name, newName).then(re => { |
|
|
|
this.store.changeName(name, newName).then(re => { |
|
|
|
|
|
|
|
this.store.setIsEdit(false, name); |
|
|
|
if (re.errorCode) { |
|
|
|
if (re.errorCode) { |
|
|
|
BI.Msg.toast(BI.i18nText(re.errorMsg), { |
|
|
|
BI.Msg.toast(BI.i18nText(re.errorMsg), { |
|
|
|
level: 'error', |
|
|
|
level: 'error', |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.nameEditor.focus(); |
|
|
|
this.nameLabel.setText(name); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.nameLabel.setText(newName); |
|
|
|
this.nameLabel.setText(newName); |
|
|
|
} |
|
|
|
} |
|
|
|