mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#1077 Cancel Request on Filter Overlay Close During Search & Reset State
This commit is contained in:
@@ -32,6 +32,7 @@ import {
|
||||
withLatestFrom,
|
||||
startWith,
|
||||
take,
|
||||
delay,
|
||||
} from 'rxjs/operators';
|
||||
import { SHELF_SCROLL_INDEX } from 'apps/sales/src/app/core/utils/app.constants';
|
||||
import { ShelfSearchbarComponent } from '../../../components';
|
||||
@@ -152,8 +153,6 @@ export class ShelfSearchInputComponent
|
||||
}
|
||||
let searchQuery = value;
|
||||
|
||||
console.log({ isAutocompleteSelected: this.isAutocompleteSelected() });
|
||||
|
||||
if (this.isAutocompleteSelected()) {
|
||||
searchQuery = this.selectedItem$.value.query;
|
||||
await this.shelfSearchService.search(searchQuery, { bypassValidation });
|
||||
@@ -295,7 +294,7 @@ export class ShelfSearchInputComponent
|
||||
|
||||
private setUpIsLoadingListener() {
|
||||
this.searchStateFacade.fetching$
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.pipe(takeUntil(this.destroy$), delay(250))
|
||||
.subscribe((isFetching) => {
|
||||
this.showAutocompleteResults$.next(!isFetching);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user