Skip to content

Commit

Permalink
fix filter dropdown blank on init
Browse files Browse the repository at this point in the history
remove unnecessary filter width property - previously set button width
  • Loading branch information
JGreenlee committed Dec 20, 2022
1 parent bc9caa1 commit fb83c24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion www/js/diary/infinite_scroll_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ angular.module('emission.main.diary.infscrolllist',['ui-leaflet',
f.state = false;
});
$scope.filterInputs[0].state = true;
$scope.data.selFilter = $scope.filterInputs[0].key;
$scope.selFilter = $scope.filterInputs[0].key;
ClientStats.addReading(ClientStats.getStatKeys().LABEL_TAB_SWITCH, {"source": null, "dest": $scope.getActiveFilters()});
$scope.allTrips = false;
const ONE_WEEK = 7 * 24 * 60 * 60; // seconds
Expand Down
6 changes: 2 additions & 4 deletions www/js/survey/enketo/infinite_scroll_filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ angular.module('emission.survey.enketo.trip.infscrollfilters',[
sf.UNLABELED = {
key: "unlabeled",
text: $translate.instant(".unlabeled"),
filter: unlabeledCheck,
width: "col-50"
filter: unlabeledCheck
}

sf.TO_LABEL = {
key: "to_label",
text: $translate.instant(".to-label"),
filter: unlabeledCheck,
width: "col-50"
filter: unlabeledCheck
}

sf.configuredFilters = [
Expand Down
6 changes: 3 additions & 3 deletions www/templates/diary/infinite_scroll_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<button class="button button-icon" ng-click="increaseHeight()">
<i class="icon ion-arrow-resize"></i>
</button>
<select ng-model="data.selFilter" ng-change="updateFilterSel(data.selFilter)">
<option ng-repeat="filter in filterInputs" ng-value="filter.key" ng-selected="{{filter.state==true}}" translate>
<select ng-model="selFilter" ng-change="updateFilterSel(selFilter)">
<option ng-repeat="filter in filterInputs" value="{{filter.key}}" translate>
{{filter.text}}
</option>
<option ng-selected="{{getActiveFilters().length < 1}}" ng-value="show-all" translate>
<option value="show-all" translate>
{{'.show-all'}}
</option>
</select>
Expand Down

0 comments on commit fb83c24

Please sign in to comment.