From 5df010d50b8cb82cea889678e68b84754cfef943 Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 17 Mar 2025 23:27:07 -0400 Subject: search results status visible before they should be --- ufund-ui/src/app/components/need-list/need-list.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ufund-ui/src/app/components/need-list/need-list.component.ts b/ufund-ui/src/app/components/need-list/need-list.component.ts index b21979f..fc2a594 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.ts +++ b/ufund-ui/src/app/components/need-list/need-list.component.ts @@ -24,7 +24,8 @@ export class NeedListComponent { ngOnInit(): void { this.refresh() - // this.close(); + + this.close(); } private showElement(element: any) { @@ -56,6 +57,7 @@ export class NeedListComponent { close() { this.hideElement(document.getElementById('search-form')); this.showElement(document.getElementById('search-button')); + this.hideElement(document.getElementById('search-status')); } private searchDelay: any; @@ -73,6 +75,8 @@ export class NeedListComponent { this.cupboardService.searchNeeds(currentSearchValue).subscribe((n) => { this.searchResults = n; console.log(currentSearchValue, this.searchResults); + this.showElement(document.getElementById('search-results')); + this.showElement(document.getElementById('search-status')); if (this.searchResults.length === this.needs.length) { this.updateSearchStatus("Please refine your search"); this.searchResults = []; -- cgit v1.2.3