aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/need-list/need-list.component.html
diff options
context:
space:
mode:
authorbenal01 <bja4245@rit.edu>2025-03-27 09:49:41 -0400
committerbenal01 <bja4245@rit.edu>2025-03-27 09:49:41 -0400
commit65590e6dfbed90e4acd342a72feb8d7b5120d70c (patch)
treef835e471ab3c00e823e1a5f0ae6df5c915c27775 /ufund-ui/src/app/components/need-list/need-list.component.html
parent84083e7229678c30d827270bfa25de66a02d7b8c (diff)
downloadJellySolutions-65590e6dfbed90e4acd342a72feb8d7b5120d70c.tar.gz
JellySolutions-65590e6dfbed90e4acd342a72feb8d7b5120d70c.tar.bz2
JellySolutions-65590e6dfbed90e4acd342a72feb8d7b5120d70c.zip
refactor sorting to use acending descending toggle
Diffstat (limited to 'ufund-ui/src/app/components/need-list/need-list.component.html')
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.html b/ufund-ui/src/app/components/need-list/need-list.component.html
index a653527..5be915c 100644
--- a/ufund-ui/src/app/components/need-list/need-list.component.html
+++ b/ufund-ui/src/app/components/need-list/need-list.component.html
@@ -3,9 +3,12 @@
<label for="sort">Sort by:</label>
<select [(ngModel)]="sortSelection" id="sort" (change)="changeSortAlgo(sortSelection, searchForm.value)">
<option *ngFor="let algorithm of SortingAlgoArrays" value="{{algorithm.name}}">
- {{algorithm.display}}
+ {{algorithm.display[sortMode === 'Ascending' ? 0 : 1]}}
</option>
</select>
+ <button (click)="changeSortMode(searchForm.value)">
+ {{sortMode}}
+ </button>
<form id="search-form" #searchForm="ngForm">
<input type="text" name="search" placeholder="Search in {{needs.length}} needs..." (input)="search(searchForm.value)" ngModel>
<input type="reset" value="Clear" (click)="search(null)"> <br>