Fix initial display value for new items #77458

This commit is contained in:
Raymond Zhao 2021-06-14 13:35:57 -07:00
parent 3d95e7271b
commit 47bccfa1c8
No known key found for this signature in database
GPG key ID: D36E5FCE46B63B58

View file

@ -598,7 +598,8 @@ export class ListSettingWidget extends AbstractListSettingWidget<IListDataItem>
valueInput = this.renderDropdown(item.value, rowElement);
currentEnumOptions = item.value.options;
if (item.value.options.length) {
currentDisplayValue = item.value.data;
currentDisplayValue = this.isItemNew(item) ?
currentEnumOptions[0].value : item.value.data;
}
break;
}