Skip to content

Commit

Permalink
fix search popover after close
Browse files Browse the repository at this point in the history
  • Loading branch information
Pop John committed Oct 24, 2024
1 parent 00eaf4d commit f87abc4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatTooltipModule } from '@angular/material/tooltip';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { delay, filter } from 'rxjs';
import { delay, filter, take } from 'rxjs';
import { ScriptActions } from '../../../../../../state/core/script/script.actions';
import { PopoverRef } from '../../../../../core/components/ms-popover';
import { PopoverService } from '../../../../../core/components/ms-popover/service/popover.service';
Expand Down Expand Up @@ -97,6 +97,13 @@ export class MsTerminalToolbarComponent implements OnInit, OnDestroy {
this.searchPanelRef.data$.pipe(untilDestroyed(this)).subscribe((data: any) => {
this.searchTerminal.emit(data);
});

this.searchPanelRef
.afterClosed()
.pipe(take(1))
.subscribe(() => {
this.searchPanelRef = undefined;
});
}

private listenToSearchFormControlChanges(): void {
Expand Down

0 comments on commit f87abc4

Please sign in to comment.