@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.
@@ -31470,24 +31470,29 @@ class TemplateVariablesFormComponent {
31470
31470
  if (variable.selectedTestDataProfileId != null) {
31471
31471
  profileToUse = this.parameterOptions.find((testData) => testData.id === variable.selectedTestDataProfileId);
31472
31472
  if (profileToUse && profileToUse.data && profileToUse.data.length > 0) {
31473
- // Find the data set that contains the parameter value
31474
- const paramName = rawValue;
31475
- if (paramName && paramName.trim()) {
31476
- // Search through all data sets to find the one containing this parameter
31477
- for (const dataSet of profileToUse.data) {
31478
- if (dataSet && dataSet.data) {
31479
- // Check if this data set has the parameter
31480
- if (dataSet.data.hasOwnProperty(paramName)) {
31481
- dataSetToUse = dataSet;
31482
- break;
31473
+ // If defaultTestDataStartIndex is provided, use it directly
31474
+ if (this.defaultTestDataStartIndex != null && profileToUse.data.length > this.defaultTestDataStartIndex) {
31475
+ dataSetToUse = profileToUse.data[this.defaultTestDataStartIndex];
31476
+ }
31477
+ else {
31478
+ // Find the data set that contains the parameter value
31479
+ const paramName = rawValue;
31480
+ if (paramName && paramName.trim()) {
31481
+ // Search through all data sets to find the one containing this parameter
31482
+ for (const dataSet of profileToUse.data) {
31483
+ if (dataSet && dataSet.data) {
31484
+ // Check if this data set has the parameter
31485
+ if (dataSet.data.hasOwnProperty(paramName)) {
31486
+ dataSetToUse = dataSet;
31487
+ break;
31488
+ }
31483
31489
  }
31484
31490
  }
31485
31491
  }
31486
- }
31487
- // If not found by parameter name, use first data set as fallback
31488
- // This ensures the data set dropdown is shown even if parameter isn't found yet
31489
- if (!dataSetToUse && profileToUse.data.length > 0) {
31490
- dataSetToUse = profileToUse.data[0];
31492
+ // If not found by parameter name, use first data set as fallback
31493
+ if (!dataSetToUse && profileToUse.data.length > 0) {
31494
+ dataSetToUse = profileToUse.data[0];
31495
+ }
31491
31496
  }
31492
31497
  }
31493
31498
  }