@cqa-lib/cqa-ui 1.1.306 → 1.1.308

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.
@@ -2167,7 +2167,7 @@ class DynamicSelectFieldComponent {
2167
2167
  catch (_b) { }
2168
2168
  }
2169
2169
  onSelectOpenedChange(opened, _select) {
2170
- var _a, _b, _c, _d, _e, _f, _g;
2170
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2171
2171
  if (opened) {
2172
2172
  // Emit click event when select is opened (clicked)
2173
2173
  this.selectClick.emit();
@@ -2193,7 +2193,7 @@ class DynamicSelectFieldComponent {
2193
2193
  try {
2194
2194
  this.loadMoreObserver.disconnect();
2195
2195
  }
2196
- catch (_h) { }
2196
+ catch (_k) { }
2197
2197
  this.loadMoreObserver = undefined;
2198
2198
  }
2199
2199
  // Remove scroll listener if attached
@@ -2201,7 +2201,7 @@ class DynamicSelectFieldComponent {
2201
2201
  try {
2202
2202
  this.panelScrollEl.removeEventListener('scroll', this.onPanelScroll);
2203
2203
  }
2204
- catch (_j) { }
2204
+ catch (_l) { }
2205
2205
  this.panelScrollEl = undefined;
2206
2206
  }
2207
2207
  // Reset load-more state when closing
@@ -2216,14 +2216,24 @@ class DynamicSelectFieldComponent {
2216
2216
  input === null || input === void 0 ? void 0 : input.focus();
2217
2217
  }, 0);
2218
2218
  }
2219
- // Optional: only trigger initial fetch on open when explicitly requested.
2220
- if (((_d = this.config) === null || _d === void 0 ? void 0 : _d.serverSearch) && this.toBoolean((_e = this.config) === null || _e === void 0 ? void 0 : _e.initialFetchOnOpen)) {
2219
+ // Server-search: reset search and refetch full list when panel opens so user always sees a fresh list.
2220
+ if ((_d = this.config) === null || _d === void 0 ? void 0 : _d.serverSearch) {
2221
+ const key = this.config.key;
2222
+ this.searchTextByKey[key] = '';
2223
+ try {
2224
+ (_f = (_e = this.config).onSearch) === null || _f === void 0 ? void 0 : _f.call(_e, '');
2225
+ }
2226
+ catch (_m) { }
2227
+ this.searchChange.emit({ key, query: '' });
2228
+ }
2229
+ else if (this.toBoolean((_g = this.config) === null || _g === void 0 ? void 0 : _g.initialFetchOnOpen)) {
2230
+ // Non-server-search: optional initial fetch on open when explicitly requested.
2221
2231
  const key = this.config.key;
2222
2232
  const q = this.searchTextByKey[key] || '';
2223
2233
  try {
2224
- (_g = (_f = this.config).onSearch) === null || _g === void 0 ? void 0 : _g.call(_f, q);
2234
+ (_j = (_h = this.config).onSearch) === null || _j === void 0 ? void 0 : _j.call(_h, q);
2225
2235
  }
2226
- catch (_k) { }
2236
+ catch (_o) { }
2227
2237
  this.searchChange.emit({ key, query: q });
2228
2238
  }
2229
2239
  this.sentinelCurrentlyInView = false;
@@ -29269,9 +29279,10 @@ class TemplateVariablesFormComponent {
29269
29279
  // Force change detection after initialization
29270
29280
  this.cdr.markForCheck();
29271
29281
  }
29272
- // If parameter options changed and we have selected test data profiles, refresh configs
29273
- if (changes['parameterOptions'] || changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
29274
- // Clear test data profile select config cache since profiles list may have changed
29282
+ // If parameter options or loading state changed, refresh test data profile configs (so search/load more and options stay in sync)
29283
+ if (changes['parameterOptions'] || changes['hasMoreParameters'] || changes['isLoadingParameters'] ||
29284
+ changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
29285
+ // Clear test data profile select config cache since profiles list or loading state may have changed
29275
29286
  this.testDataProfileSelectConfigCache.clear();
29276
29287
  this.templateVariables.forEach((variable, index) => {
29277
29288
  if (this.isParameterType(variable)) {
@@ -30160,11 +30171,18 @@ class TemplateVariablesFormComponent {
30160
30171
  key: 'selectedTestDataProfile',
30161
30172
  placeholder: 'Select Test Data Profile',
30162
30173
  multiple: false,
30163
- searchable: false,
30174
+ searchable: true,
30175
+ serverSearch: true,
30164
30176
  options: optionsArray,
30165
- hasMore: false,
30166
- isLoading: false,
30177
+ hasMore: this.hasMoreParameters,
30178
+ isLoading: this.isLoadingParameters,
30167
30179
  disabled: isDisabled,
30180
+ onSearch: (query) => {
30181
+ this.searchParameters.emit(query);
30182
+ },
30183
+ onLoadMore: (query) => {
30184
+ this.loadMoreParameters.emit();
30185
+ },
30168
30186
  onChange: (value) => {
30169
30187
  var _a, _b, _c;
30170
30188
  // Value is the profile ID (string) from the mat-option