Skip to content

Commit

Permalink
#1771 Fix sort of field selection listboxes on dashboard widget filte…
Browse files Browse the repository at this point in the history
…r forms
  • Loading branch information
nadouani committed Feb 4, 2021
1 parent 8c096ef commit 57825f6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/app/scripts/services/api/DashboardSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
_.each(metadata.entities, function(entity) {
metadata[entity] = _.omit(data[entity], 'attributes');
metadata[entity].attributes = self._objectifyBy(data[entity].attributes, 'name');
metadata[entity].attributeKeys = _.keys(metadata[entity].attributes).sort();
});

self.metadata[version] = metadata;
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/directives/dashboard/filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</button>
</span>
<select class="form-control" ng-model="filter.field"
ng-options="item.name as item.name for (key, item) in metadata[component.options.entity].attributes"
ng-options="item for item in metadata[component.options.entity].attributeKeys"
ng-change="setFilterField(filter, component.options.entity)"></select>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</button>
</span>
<select class="form-control" ng-model="filter.field"
ng-options="item.name as item.name for (key, item) in metadata[serie.entity].attributes"
ng-options="item for item in metadata[serie.entity].attributeKeys"
ng-change="setFilterField(filter, serie.entity)"></select>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/directives/dashboard/serie.filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</button>
</span>
<select class="form-control" ng-model="filter.field"
ng-options="item.name as item.name for (key, item) in metadata[component.options.entity].attributes"
ng-options="item for item in metadata[component.options.entity].attributeKeys"
ng-change="setFilterField(filter, component.options.entity)"></select>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</button>
</span>
<select class="form-control" ng-model="filter.field"
ng-options="item.name as item.name for (key, item) in metadata[serie.entity].attributes"
ng-options="item for item in metadata[serie.entity].attributeKeys"
ng-change="setFilterField(filter, serie.entity)"></select>
</div>
</div>
Expand Down

0 comments on commit 57825f6

Please sign in to comment.