Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/app/shared/issue/assignee/assignee.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatSelect } from '@angular/material/select';
import { first } from 'rxjs/operators';
import { Issue } from '../../../core/models/issue.model';
Expand All @@ -14,7 +14,7 @@ import { PhaseService } from '../../../core/services/phase.service';
styleUrls: ['./assignee.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AssigneeComponent implements OnInit {
export class AssigneeComponent implements OnInit, OnChanges {
teamMembers: string[];
isInEditMode = false;
assignees: string[];
Expand All @@ -39,6 +39,12 @@ export class AssigneeComponent implements OnInit {
this.assignees = this.issue.assignees.map((a) => a);
}

ngOnChanges(changes: SimpleChanges) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As warned by the github actions, please inherit from the OnChanges interface

if (changes['issue']) {
this.assignees = [...(this.issue?.assignees || [])];
}
}

openSelector() {
this.isInEditMode = true;
this.assigneeSelection.open();
Expand Down