@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.
@@ -2174,8 +2174,18 @@ class DynamicSelectFieldComponent {
2174
2174
  input?.focus();
2175
2175
  }, 0);
2176
2176
  }
2177
- // Optional: only trigger initial fetch on open when explicitly requested.
2178
- if (this.config?.serverSearch && this.toBoolean(this.config?.initialFetchOnOpen)) {
2177
+ // Server-search: reset search and refetch full list when panel opens so user always sees a fresh list.
2178
+ if (this.config?.serverSearch) {
2179
+ const key = this.config.key;
2180
+ this.searchTextByKey[key] = '';
2181
+ try {
2182
+ this.config.onSearch?.('');
2183
+ }
2184
+ catch { }
2185
+ this.searchChange.emit({ key, query: '' });
2186
+ }
2187
+ else if (this.toBoolean(this.config?.initialFetchOnOpen)) {
2188
+ // Non-server-search: optional initial fetch on open when explicitly requested.
2179
2189
  const key = this.config.key;
2180
2190
  const q = this.searchTextByKey[key] || '';
2181
2191
  try {
@@ -29246,9 +29256,10 @@ class TemplateVariablesFormComponent {
29246
29256
  // Force change detection after initialization
29247
29257
  this.cdr.markForCheck();
29248
29258
  }
29249
- // If parameter options changed and we have selected test data profiles, refresh configs
29250
- if (changes['parameterOptions'] || changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
29251
- // Clear test data profile select config cache since profiles list may have changed
29259
+ // If parameter options or loading state changed, refresh test data profile configs (so search/load more and options stay in sync)
29260
+ if (changes['parameterOptions'] || changes['hasMoreParameters'] || changes['isLoadingParameters'] ||
29261
+ changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
29262
+ // Clear test data profile select config cache since profiles list or loading state may have changed
29252
29263
  this.testDataProfileSelectConfigCache.clear();
29253
29264
  this.templateVariables.forEach((variable, index) => {
29254
29265
  if (this.isParameterType(variable)) {
@@ -30126,11 +30137,18 @@ class TemplateVariablesFormComponent {
30126
30137
  key: 'selectedTestDataProfile',
30127
30138
  placeholder: 'Select Test Data Profile',
30128
30139
  multiple: false,
30129
- searchable: false,
30140
+ searchable: true,
30141
+ serverSearch: true,
30130
30142
  options: optionsArray,
30131
- hasMore: false,
30132
- isLoading: false,
30143
+ hasMore: this.hasMoreParameters,
30144
+ isLoading: this.isLoadingParameters,
30133
30145
  disabled: isDisabled,
30146
+ onSearch: (query) => {
30147
+ this.searchParameters.emit(query);
30148
+ },
30149
+ onLoadMore: (query) => {
30150
+ this.loadMoreParameters.emit();
30151
+ },
30134
30152
  onChange: (value) => {
30135
30153
  // Value is the profile ID (string) from the mat-option
30136
30154
  // Find the test data profile by ID to get the name