@alfresco/adf-process-services-cloud 8.4.0-21703946771 → 8.4.0-21751745604
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8197,10 +8197,16 @@ class DropdownCloudWidgetComponent extends WidgetComponent {
|
|
|
8197
8197
|
value = this.field?.value;
|
|
8198
8198
|
}
|
|
8199
8199
|
else if (this.field?.value && typeof this.field?.value === 'object') {
|
|
8200
|
-
|
|
8200
|
+
const obj = this.field.value;
|
|
8201
|
+
if (obj.id === DEFAULT_OPTION.id || obj.id === '' || obj.id === undefined) {
|
|
8202
|
+
value = null;
|
|
8203
|
+
}
|
|
8204
|
+
else {
|
|
8205
|
+
value = { id: obj.id, name: obj.name };
|
|
8206
|
+
}
|
|
8201
8207
|
}
|
|
8202
|
-
else if (this.field.value === null) {
|
|
8203
|
-
value =
|
|
8208
|
+
else if (this.field.value === null || this.field.value === undefined || this.field.value === '') {
|
|
8209
|
+
value = null;
|
|
8204
8210
|
}
|
|
8205
8211
|
else {
|
|
8206
8212
|
value = { id: this.field?.value, name: '' };
|
|
@@ -8502,6 +8508,10 @@ class DropdownCloudWidgetComponent extends WidgetComponent {
|
|
|
8502
8508
|
return event.field.type === FormFieldTypes.DROPDOWN;
|
|
8503
8509
|
}
|
|
8504
8510
|
setOptionValue(option, field) {
|
|
8511
|
+
if (option == null) {
|
|
8512
|
+
field.value = undefined;
|
|
8513
|
+
return;
|
|
8514
|
+
}
|
|
8505
8515
|
if (Array.isArray(option) || field.hasMultipleValues) {
|
|
8506
8516
|
field.value = option;
|
|
8507
8517
|
return;
|