Skip to content

Commit

Permalink
view case flags link defect fix (#1589)
Browse files Browse the repository at this point in the history
* view case flags link defect fix

* version number changed

* toolkit version updated

* eslint warning

* version updated

* toolkit version updated

---------

Co-authored-by: RiteshHMCTS <[email protected]>
Co-authored-by: Ritesh Dsouza <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2023
1 parent 14bc451 commit 250e3fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.19.11-case-file-view-feature-toggle-v1.1",
"version": "6.19.12-rc3",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.19.11-case-file-view-feature-toggle-v1.1",
"version": "6.19.12-rc3",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class CaseFullAccessViewComponent implements OnInit, OnDestroy, OnChanges
// sortedTabs are fragments
// appended/prepepended tabs use router navigation
if ((tabIndexChanged <= 1 && this.prependedTabs && this.prependedTabs.length) ||
(this.appendedTabs && this.appendedTabs.length && tabLabel === this.HEARINGS_TAB_LABEL)) {
(this.appendedTabs?.length && tabLabel === this.HEARINGS_TAB_LABEL)) {
// Hack to get ID from tab as it's not easily achieved through Angular Material Tabs
const tab = matTab['_viewContainerRef'] as ViewContainerRef;
const id = (tab.element.nativeElement as HTMLElement).id;
Expand All @@ -333,6 +333,7 @@ export class CaseFullAccessViewComponent implements OnInit, OnDestroy, OnChanges
const targetTabIndex = this.tabGroup._tabs.toArray().findIndex(tab => tab.textLabel === triggerOutputEventText);
if (targetTabIndex > -1) {
this.selectedTabIndex = targetTabIndex;
this.tabGroup.selectedIndex = targetTabIndex;
}
}

Expand Down

0 comments on commit 250e3fe

Please sign in to comment.