mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Search] Fix filter display names
Changed form type keys to names
This commit is contained in:
parent
c62e73f863
commit
371b690072
@ -186,9 +186,8 @@ define(function () {
|
||||
updateOptions: function () {
|
||||
var type;
|
||||
|
||||
// Update all-checked status and the filters string
|
||||
// Update all-checked status
|
||||
$scope.ngModel.checkAll = true;
|
||||
$scope.filtersString = '';
|
||||
for (type in $scope.ngModel.checked) {
|
||||
if (!$scope.ngModel.checked[type]) {
|
||||
$scope.ngModel.checkAll = false;
|
||||
@ -200,8 +199,23 @@ define(function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($scope.ngModel.checkAll === true) {
|
||||
$scope.filtersString = '';
|
||||
|
||||
// Update the current filters string
|
||||
$scope.filtersString = '';
|
||||
if ($scope.ngModel.checkAll !== true) {
|
||||
var i;
|
||||
|
||||
for (i = 0; i < types.length; i += 1) {
|
||||
// If the type key corresponds to a checked option...
|
||||
if ($scope.ngModel.checked[types[i].key]) {
|
||||
// ... add it to the string list of current filter options
|
||||
if ($scope.filtersString === '') {
|
||||
$scope.filtersString += types[i].name;
|
||||
} else {
|
||||
$scope.filtersString += ', ' + types[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Re-filter results
|
||||
|
Loading…
x
Reference in New Issue
Block a user