From d8b9c0da32383630f0831fdf6a7f13c96174ee4c Mon Sep 17 00:00:00 2001 From: benal01 Date: Sat, 22 Mar 2025 12:17:50 -0400 Subject: removing unneccicary functions for element visiblity in need list --- .../components/need-list/need-list.component.css | 3 +-- .../components/need-list/need-list.component.ts | 29 ---------------------- 2 files changed, 1 insertion(+), 31 deletions(-) (limited to 'ufund-ui/src/app/components/need-list') diff --git a/ufund-ui/src/app/components/need-list/need-list.component.css b/ufund-ui/src/app/components/need-list/need-list.component.css index bf7b982..29a9626 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.css +++ b/ufund-ui/src/app/components/need-list/need-list.component.css @@ -26,6 +26,5 @@ li { background-color: #d9d9d9; padding: 10px 20px 20px 20px; border: 2px solid #000; - border-radius: 5px; - visibility: visible; + border-radius: 5px; } \ No newline at end of file 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 f5d7855..3f77df4 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,38 +24,11 @@ export class NeedListComponent { this.needs = n; this.searchResults = this.needs; }); - console.log(this.searchResults); } ngOnInit(): void { this.refresh() - this.close(); - } - - private showElement(element: any) { - if (element){ - element.style.visibility = 'visible'; - element.style.position = 'relative'; - } - } - - private hideElement(element: any) { - if (element){ - element.style.visibility = 'hidden'; - element.style.position = 'absolute'; - } - } - - open() { - this.hideElement(document.getElementById('search-button')); - this.showElement(document.getElementById('search-container')); - } - - close() { - this.hideElement(document.getElementById('search-container')); - this.showElement(document.getElementById('search-button')); - this.hideElement(document.getElementById('search-status')); } private searchDelay: any; @@ -75,8 +48,6 @@ 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')); }); } }, 250); -- cgit v1.2.3