Skip to content

Commit

Permalink
Merge pull request #3702 from cisagov/bug/CSET-2529
Browse files Browse the repository at this point in the history
Fixed component detail toggle
  • Loading branch information
randywoods authored Jan 16, 2024
2 parents f5e2f75 + 026d05e commit 7cf0188
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export class QuestionExtrasComponent implements OnInit {

showQuestionIds = false;

toggleComponent = false;

/**
* Stores the original document title, in case the user escapes out of an unwanted change
*/
Expand Down Expand Up @@ -169,12 +171,20 @@ export class QuestionExtrasComponent implements OnInit {
this.extras = details;
if (details.is_Component === true){
this.myQuestion.is_Component = true;
this.toggleComponent = true;
}

this.extras.questionId = this.myQuestion.questionId;

// populate my details with the first "non-null" tab
this.tab = this.extras.listTabs?.find(t => t.requirementFrameworkTitle != null) ?? this.extras.listTabs[0];


// Component detail toggle
if (this.toggleComponent == true){
this.toggleExtras('COMPONENT')
this.toggleComponent = false;
}

// add questionIDs to related questions for debug if configured to do so
if (this.showQuestionIds) {
Expand Down

0 comments on commit 7cf0188

Please sign in to comment.