Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor: TTL-910 modify ngOnchange feature
  • Loading branch information
Santiago220991 committed Aug 3, 2023
commit 638d5d41040de0e2f3ea4df1992e8859f073617f
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,9 @@ export class TimeRangeCustomComponent implements OnInit, OnChanges {
}

ngOnChanges(changes: SimpleChanges) {
if (changes.userId) {
if (!changes.userId.firstChange) {
this.onSubmit();
}
}
if (changes.projectId) {
if (!changes.projectId.firstChange) {
this.onSubmit();
}
}
if (changes.activityId) {
if (!changes.activityId.firstChange) {
this.onSubmit();
}
const firstChange = Object.values(changes)[0].firstChange;
if (!firstChange) {
this.onSubmit();
}
}

Expand Down