@dyedurham/search-and-file-widget 2.0.94 → 2.0.95
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/dnd-filing-shell.js +10 -2
- package/package.json +1 -1
package/dnd-filing-shell.js
CHANGED
|
@@ -85112,14 +85112,22 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85112
85112
|
this.setOfficeAddressEnabled(group2, enabled);
|
|
85113
85113
|
return group2;
|
|
85114
85114
|
}
|
|
85115
|
-
/**
|
|
85115
|
+
/**
|
|
85116
|
+
* Enables or disables the editable controls of an address grid (used by "Same as…" checkboxes).
|
|
85117
|
+
* Hiding a grid also clears it, so un-ticking the checkbox shows an empty address to fill in.
|
|
85118
|
+
*/
|
|
85116
85119
|
static setOfficeAddressEnabled(group2, enabled) {
|
|
85117
85120
|
if (!group2) {
|
|
85118
85121
|
return;
|
|
85119
85122
|
}
|
|
85120
85123
|
EDITABLE_ADDRESS_CONTROLS.forEach((name) => {
|
|
85121
85124
|
const control = group2.get(name);
|
|
85122
|
-
|
|
85125
|
+
if (enabled) {
|
|
85126
|
+
control?.enable({ emitEvent: false });
|
|
85127
|
+
} else {
|
|
85128
|
+
control?.setValue("", { emitEvent: false });
|
|
85129
|
+
control?.disable({ emitEvent: false });
|
|
85130
|
+
}
|
|
85123
85131
|
});
|
|
85124
85132
|
group2.updateValueAndValidity({ emitEvent: false });
|
|
85125
85133
|
}
|