@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.
@@ -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
- /** Enables or disables the editable controls of an address grid (used by "Same as…" checkboxes). */
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
- enabled ? control?.enable({ emitEvent: false }) : control?.disable({ emitEvent: false });
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyedurham/search-and-file-widget",
3
- "version": "2.0.94",
3
+ "version": "2.0.95",
4
4
  "description": "",
5
5
  "main": "dnd-filing-shell.js",
6
6
  "scripts": {