ui-core-abv 0.8.8 → 0.8.9
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.
package/fesm2022/ui-core-abv.mjs
CHANGED
|
@@ -9806,6 +9806,7 @@ const EXTRA_FORM_FIELDS = [
|
|
|
9806
9806
|
internalIcon: 'ri-database-2-line',
|
|
9807
9807
|
tip: 'form_builder.extra.optionsSourceKey_tip',
|
|
9808
9808
|
type: 'text',
|
|
9809
|
+
selectNullable: true,
|
|
9809
9810
|
selectSearchEnabled: true,
|
|
9810
9811
|
showSubtitle: true
|
|
9811
9812
|
},
|
|
@@ -10504,6 +10505,7 @@ class FieldEditorComponent {
|
|
|
10504
10505
|
}
|
|
10505
10506
|
updateFieldValues(fr) {
|
|
10506
10507
|
const current = this.localField();
|
|
10508
|
+
const hadExternalOptionsSource = !!current.optionsSource?.key;
|
|
10507
10509
|
const isAutoName = /^(field|sf)_\d+$/.test(current.name ?? '');
|
|
10508
10510
|
const isNameManuallySet = this.config().nameManuallySet ?? false;
|
|
10509
10511
|
if (fr['name'] !== undefined && fr['name'] !== current.name) {
|
|
@@ -10519,6 +10521,10 @@ class FieldEditorComponent {
|
|
|
10519
10521
|
...fr,
|
|
10520
10522
|
...(derivedName !== undefined ? { name: derivedName } : {})
|
|
10521
10523
|
};
|
|
10524
|
+
const hasExternalOptionsSource = !!updatedField.optionsSource?.key;
|
|
10525
|
+
if (!hadExternalOptionsSource && hasExternalOptionsSource && this.hasOptions()) {
|
|
10526
|
+
updatedField.options = [];
|
|
10527
|
+
}
|
|
10522
10528
|
this.localField.set(updatedField);
|
|
10523
10529
|
this.fieldChange.emit(updatedField);
|
|
10524
10530
|
}
|
|
@@ -11419,8 +11425,9 @@ class UicUserFormbuilderComponent {
|
|
|
11419
11425
|
const { optionsSource: _optionsSource, ...restFieldData } = cleanFieldData;
|
|
11420
11426
|
return this.cleanExternalValidationConfig(restFieldData, externalValidation);
|
|
11421
11427
|
}
|
|
11428
|
+
const { options: _manualOptions, ...fieldDataWithoutManualOptions } = cleanFieldData;
|
|
11422
11429
|
return this.cleanExternalValidationConfig({
|
|
11423
|
-
...
|
|
11430
|
+
...fieldDataWithoutManualOptions,
|
|
11424
11431
|
optionsSource: cleanOptionsSource
|
|
11425
11432
|
}, externalValidation);
|
|
11426
11433
|
}
|