@hmcts/ccd-case-ui-toolkit 7.0.37-default-tab-fix → 7.0.37

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.
@@ -31212,8 +31212,8 @@ class CaseFullAccessViewComponent {
31212
31212
  else {
31213
31213
  // sort with the order of CCD predefined tabs
31214
31214
  this.caseDetails.tabs.sort((aTab, bTab) => aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0));
31215
- // select the first tab checking if the tab is visible
31216
- const preSelectTab = this.findPreSelectedActiveTab();
31215
+ // preselect the 1st order of CCD predefined tabs
31216
+ const preSelectTab = this.caseDetails.tabs[0];
31217
31217
  this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: preSelectTab.label }).then(() => {
31218
31218
  matTab = this.tabGroup._tabs.find((x) => x.textLabel === preSelectTab.label);
31219
31219
  // Update selectedIndex only if matTab.position is a non-zero number (positive or negative); this means the
@@ -31244,11 +31244,6 @@ class CaseFullAccessViewComponent {
31244
31244
  }
31245
31245
  }
31246
31246
  }
31247
- findPreSelectedActiveTab() {
31248
- const unOrderedTabsInSortedTabs = this.caseDetails.tabs
31249
- .filter((tab) => !tab.order && this.sortedTabs.some((sortedTab) => sortedTab.id === tab.id));
31250
- return unOrderedTabsInSortedTabs.length ? unOrderedTabsInSortedTabs[0] : this.sortedTabs[0];
31251
- }
31252
31247
  // Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
31253
31248
  tabChanged(tabIndexChanged) {
31254
31249
  const matTab = this.tabGroup._tabs.find(tab => tab.isActive);