forty-cdk 0.44.0 → 0.45.1

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.
@@ -82,11 +82,6 @@ const COMBOBOX_TRIGGERS = new InjectionToken("COMBOBOX_TRIGGERS", {
82
82
  providedIn: "root",
83
83
  factory: () => new RootedRegistry()
84
84
  });
85
- const ROOT_ASSERTION = {
86
- entryPoint: "combobox",
87
- token: "FOR_COMBOBOX_CONTEXT",
88
- root: "[forCombobox]"
89
- };
90
85
  function injectComboboxContext(piece) {
91
86
  const ctx = inject(FOR_COMBOBOX_CONTEXT, { optional: true });
92
87
  if (!ctx) throw orphanContextError({
@@ -97,7 +92,9 @@ function injectComboboxContext(piece) {
97
92
  });
98
93
  const widened = ctx;
99
94
  assertRootContext({
100
- ...ROOT_ASSERTION,
95
+ entryPoint: "combobox",
96
+ token: "FOR_COMBOBOX_CONTEXT",
97
+ root: "[forCombobox]",
101
98
  piece,
102
99
  probe: () => widened.registerInput
103
100
  });
@@ -122,7 +119,9 @@ function injectComboboxTriggerContext(explicitRoot) {
122
119
  });
123
120
  const widened = resolved;
124
121
  assertRootContext({
125
- ...ROOT_ASSERTION,
122
+ entryPoint: "combobox",
123
+ token: "FOR_COMBOBOX_CONTEXT",
124
+ root: "[forCombobox]",
126
125
  piece: "ForComboboxTrigger",
127
126
  probe: () => widened.registerInput
128
127
  });
@@ -627,8 +626,8 @@ var ForCombobox = class ForCombobox extends AnchoredFormValueControlBase {
627
626
  this.#syncInputValue("");
628
627
  return;
629
628
  }
630
- if (this.restoreQueryOnClose() && !this.multiple() && reason !== "select") {
631
- const label = this.selected()[0]?.label ?? "";
629
+ if (this.restoreQueryOnClose() && reason !== "select") {
630
+ const label = this.multiple() ? "" : this.selected()[0]?.label ?? "";
632
631
  this.query.set(label);
633
632
  this.#syncInputValue(label);
634
633
  }