extractValue 用法错误修复

This commit is contained in:
2betop 2020-03-12 17:33:41 +08:00
parent 737696f81c
commit c196fad821
1 changed files with 8 additions and 4 deletions

View File

@ -373,7 +373,7 @@ export function registerOptionsControl(config: OptionsConfig) {
newValue = valueArray[0] || resetValue;
if (joinValues && newValue) {
if ((joinValues || extractValue) && newValue) {
newValue = (newValue as any)[valueField || 'value'];
}
}
@ -774,9 +774,13 @@ export function registerOptionsControl(config: OptionsConfig) {
setOptions={this.setOptions}
syncOptions={this.syncOptions}
reloadOptions={this.reload}
creatable={creatable || creatable !== false && isEffectiveApi(addApi)}
editable={editable || editable !== false && isEffectiveApi(editApi)}
removable={removable || removable !== false && isEffectiveApi(deleteApi)}
creatable={
creatable || (creatable !== false && isEffectiveApi(addApi))
}
editable={editable || (editable !== false && isEffectiveApi(editApi))}
removable={
removable || (removable !== false && isEffectiveApi(deleteApi))
}
onAdd={this.handleOptionAdd}
onEdit={this.handleOptionEdit}
onDelete={this.handleOptionDelete}