aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src
diff options
context:
space:
mode:
authorbenal01 <bja4245@rit.edu>2025-03-27 10:36:32 -0400
committerbenal01 <bja4245@rit.edu>2025-03-27 10:36:32 -0400
commit0b4c76c5dc7313ae42c62be3c682c1f88cec13fd (patch)
tree76be4def21f5958f0eca4d895d58e6a66dcce9cd /ufund-ui/src
parentee4154df85a971f3a0f8e43fd6afdfa6a620ea99 (diff)
downloadJellySolutions-0b4c76c5dc7313ae42c62be3c682c1f88cec13fd.tar.gz
JellySolutions-0b4c76c5dc7313ae42c62be3c682c1f88cec13fd.tar.bz2
JellySolutions-0b4c76c5dc7313ae42c62be3c682c1f88cec13fd.zip
defaut value for sorting
Diffstat (limited to 'ufund-ui/src')
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.html2
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.ts4
2 files changed, 3 insertions, 3 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 4f259a0..693307f 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
@@ -1,7 +1,7 @@
<h1>Needs List</h1>
<div id="search-container">
<label for="sort">Sort by:</label>
- <select [(ngModel)] = "sortSelection" id="sort" (change)="search(searchForm.value)">
+ <select [(ngModel)] = "sortSelection" id="sort" (change)="search(searchForm.value)" [value]="sortSelection">
<option *ngFor="let algorithm of SortingAlgoArrays" value="{{algorithm.name}}">
{{algorithm.display[sortMode === 'Ascending' ? 0 : 1]}}
</option>
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 177d9f7..f935e03 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
@@ -40,10 +40,10 @@ export class NeedListComponent {
sortMode = 'Ascending'
currentSortAlgo: sortAlgo = sortByGoal;
- sortSelection: string = this.currentSortAlgo.name;
+ sortSelection: string = 'sortByGoal';
SortingAlgoArrays: {func:sortAlgo,name:string, display:string[]}[] = [
- {func:sortByGoal,name:"sortByMaxGoal", display:["Max Goal", "Min Goal"]},
+ {func:sortByGoal,name:"sortByGoal", display:["Max Goal", "Min Goal"]},
{func:sortByName,name:"sortByName", display:["Name", "Name (Descending)"]},
];