-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task/implement history log of parent blocking #2325
Task/implement history log of parent blocking #2325
Conversation
SergeyGSA
commented
Jan 4, 2024
- added history log of parents blocking
- reworked filters of history log
this.filterData.emit(this.filtersForm.value); | ||
} | ||
|
||
public ngOnChanges(changes: SimpleChanges): void { | ||
this.setBaseFiltersForm(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I need to do this every time a change occurs, or only when switching tabs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this only when tabs switching, so I can move this code to the component on higher level. There are mat-tabs in this component and I can observe tabs changing and execute this methods. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use a setter for input property (tabName in my understanding) to track that the tab has been changed and reset the form only in this case.
E.g:
@Input public set tabName(newValue) {
this._tabName = newValue;
// reset form
// ...
}
public get tabName() {
return this._tabName;
}
@@ -163,4 +174,26 @@ export class HistoryLogComponent implements OnInit, OnDestroy { | |||
Util.setFromPaginationParam(this.filters, this.currentPage, this.totalAmount); | |||
this.dispatchProperValue(this.tabIndex, this.filters, searchString); | |||
} | |||
|
|||
private initSubscribeOnEachHistory(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have multiple subscriptions to perform the same action.
Can we combine them using a merge operator or some other option?
this.filterData.emit(this.filtersForm.value); | ||
} | ||
|
||
public ngOnChanges(changes: SimpleChanges): void { | ||
this.setBaseFiltersForm(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use a setter for input property (tabName in my understanding) to track that the tab has been changed and reset the form only in this case.
E.g:
@Input public set tabName(newValue) {
this._tabName = newValue;
// reset form
// ...
}
public get tabName() {
return this._tabName;
}