diff options
Diffstat (limited to 'ufund-ui/src/app/components/need-list')
-rw-r--r-- | ufund-ui/src/app/components/need-list/need-list.component.html | 2 | ||||
-rw-r--r-- | ufund-ui/src/app/components/need-list/need-list.component.ts | 4 |
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)"]}, ]; |