Fixed search result placeholder not resetting correctly

This commit is contained in:
squidfunk
2020-10-04 15:40:58 +02:00
parent e277ad635b
commit b3271bab9f
6 changed files with 7 additions and 10 deletions

View File

@@ -23,7 +23,6 @@
import {
MonoTypeOperatorFunction,
Observable,
animationFrameScheduler,
combineLatest,
fromEvent,
merge,
@@ -34,7 +33,6 @@ import {
distinctUntilChanged,
finalize,
map,
observeOn,
startWith,
tap
} from "rxjs/operators"
@@ -114,8 +112,7 @@ export function applySearchQuery(
): MonoTypeOperatorFunction<SearchQuery> {
return pipe(
/* Defer repaint to next animation frame */
observeOn(animationFrameScheduler),
/* Hide placeholder when search is focused */
tap(({ focus }) => {
if (focus) {
setSearchQueryPlaceholder(el, "")