@cqa-lib/cqa-ui 1.1.398 → 1.1.399

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.
@@ -31420,24 +31420,29 @@ class TemplateVariablesFormComponent {
31420
31420
  if (variable.selectedTestDataProfileId != null) {
31421
31421
  profileToUse = this.parameterOptions.find((testData) => testData.id === variable.selectedTestDataProfileId);
31422
31422
  if (profileToUse && profileToUse.data && profileToUse.data.length > 0) {
31423
- // Find the data set that contains the parameter value
31424
- const paramName = rawValue;
31425
- if (paramName && paramName.trim()) {
31426
- // Search through all data sets to find the one containing this parameter
31427
- for (const dataSet of profileToUse.data) {
31428
- if (dataSet && dataSet.data) {
31429
- // Check if this data set has the parameter
31430
- if (dataSet.data.hasOwnProperty(paramName)) {
31431
- dataSetToUse = dataSet;
31432
- break;
31423
+ // If defaultTestDataStartIndex is provided, use it directly
31424
+ if (this.defaultTestDataStartIndex != null && profileToUse.data.length > this.defaultTestDataStartIndex) {
31425
+ dataSetToUse = profileToUse.data[this.defaultTestDataStartIndex];
31426
+ }
31427
+ else {
31428
+ // Find the data set that contains the parameter value
31429
+ const paramName = rawValue;
31430
+ if (paramName && paramName.trim()) {
31431
+ // Search through all data sets to find the one containing this parameter
31432
+ for (const dataSet of profileToUse.data) {
31433
+ if (dataSet && dataSet.data) {
31434
+ // Check if this data set has the parameter
31435
+ if (dataSet.data.hasOwnProperty(paramName)) {
31436
+ dataSetToUse = dataSet;
31437
+ break;
31438
+ }
31433
31439
  }
31434
31440
  }
31435
31441
  }
31436
- }
31437
- // If not found by parameter name, use first data set as fallback
31438
- // This ensures the data set dropdown is shown even if parameter isn't found yet
31439
- if (!dataSetToUse && profileToUse.data.length > 0) {
31440
- dataSetToUse = profileToUse.data[0];
31442
+ // If not found by parameter name, use first data set as fallback
31443
+ if (!dataSetToUse && profileToUse.data.length > 0) {
31444
+ dataSetToUse = profileToUse.data[0];
31445
+ }
31441
31446
  }
31442
31447
  }
31443
31448
  }