mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Fixed subject complete to avoid calling a reset event when complete
This commit is contained in:
parent
11aaaa67d5
commit
338d3bb359
@ -1,6 +1,7 @@
|
|||||||
<div (keyup)="onKeyPress($event)" tabindex="-1" role="button" class="adf-notification-history-container">
|
<div (keyup)="onKeyPress($event)" tabindex="-1" role="button" class="adf-notification-history-container">
|
||||||
<button mat-button
|
<button mat-button
|
||||||
[matMenuTriggerFor]="menu"
|
[matMenuTriggerFor]="menu"
|
||||||
|
aria-hidden="false"
|
||||||
[attr.aria-label]="'NOTIFICATIONS.OPEN_HISTORY' | translate"
|
[attr.aria-label]="'NOTIFICATIONS.OPEN_HISTORY' | translate"
|
||||||
title="{{ 'NOTIFICATIONS.OPEN_HISTORY' | translate }}"
|
title="{{ 'NOTIFICATIONS.OPEN_HISTORY' | translate }}"
|
||||||
class="adf-notification-history-menu_button"
|
class="adf-notification-history-menu_button"
|
||||||
|
@ -166,9 +166,12 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
|
|||||||
private toggleSearch = new Subject<any>();
|
private toggleSearch = new Subject<any>();
|
||||||
private focusSubscription: Subscription;
|
private focusSubscription: Subscription;
|
||||||
private valueChange = new Subject<string>();
|
private valueChange = new Subject<string>();
|
||||||
|
private toggleSubscription: Subscription;
|
||||||
|
|
||||||
|
toggle$ = this.toggleSearch.asObservable();
|
||||||
|
|
||||||
constructor(private userPreferencesService: UserPreferencesService) {
|
constructor(private userPreferencesService: UserPreferencesService) {
|
||||||
this.toggleSearch.pipe(debounceTime(200), takeUntil(this.onDestroy$)).subscribe(() => {
|
this.toggleSubscription = this.toggle$.pipe(debounceTime(200), takeUntil(this.onDestroy$)).subscribe(() => {
|
||||||
if (this.expandable) {
|
if (this.expandable) {
|
||||||
this.subscriptAnimationState = this.toggleAnimation();
|
this.subscriptAnimationState = this.toggleAnimation();
|
||||||
if (this.subscriptAnimationState.value === 'inactive') {
|
if (this.subscriptAnimationState.value === 'inactive') {
|
||||||
@ -302,6 +305,7 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
if (this.toggleSearch) {
|
if (this.toggleSearch) {
|
||||||
|
this.toggleSubscription.unsubscribe();
|
||||||
this.toggleSearch.complete();
|
this.toggleSearch.complete();
|
||||||
this.toggleSearch = null;
|
this.toggleSearch = null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user