diff options
author | benal01 <bja4245@rit.edu> | 2025-04-03 11:57:50 -0400 |
---|---|---|
committer | benal01 <bja4245@rit.edu> | 2025-04-03 11:57:50 -0400 |
commit | c8b1f6d7eaf71b4b7eeba966c82583a24436ff35 (patch) | |
tree | 467054c92bbd3c1644837d61bf8e58f664888abf /ufund-ui/src/app/components/need-list/need-list.component.ts | |
parent | 6a93ead4f262bf7571192417cc2f6029e9a9e3a8 (diff) | |
parent | fb6d8140830bbb5081056105eaa775f26885da8f (diff) | |
download | JellySolutions-c8b1f6d7eaf71b4b7eeba966c82583a24436ff35.tar.gz JellySolutions-c8b1f6d7eaf71b4b7eeba966c82583a24436ff35.tar.bz2 JellySolutions-c8b1f6d7eaf71b4b7eeba966c82583a24436ff35.zip |
Merge branch 'need-image' of https://github.com/RIT-SWEN-261-02/team-project-2245-swen-261-02-2b-jellysolutions into need-image
Diffstat (limited to '')
-rw-r--r-- | ufund-ui/src/app/components/need-list/need-list.component.ts | 11 |
1 files changed, 8 insertions, 3 deletions
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 2ec850e..ae6bc99 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 @@ -96,9 +96,14 @@ export class NeedListComponent { this.updateVisibleNeeds() } - editNeedsPerPage(amount: number) { - this.itemsPerPage = amount; - this.updateVisibleNeeds(); + editNeedsPerPage() { + if (this.itemsPerPage > this.searchResults.length) { + this.itemsPerPage = this.searchResults.length; + } + if (this.itemsPerPage < 1) { + this.itemsPerPage = 1; + } + this.resetVisibleNeeds(); } updateVisibleNeeds() { |