Fix check for existing userStatesFilter
(cherry picked from commit f7e73fbff5)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
5db507cb96
commit
faf69e4349
@@ -187,7 +187,23 @@
|
||||
}
|
||||
|
||||
function initUserStateSelections() {
|
||||
initUsersOptionsFilterSelections(vm.userStatesFilter, vm.usersOptions.userStates, "key");
|
||||
if (!vm.usersOptions.userStates && vm.userStatesFilter) {
|
||||
// create a new empty userStates array
|
||||
vm.usersOptions.userStates = [];
|
||||
|
||||
// add selected userStatesFilters to usersOptions.userStates array
|
||||
for (var i = 0; i < vm.userStatesFilter.length; i++) {
|
||||
if (vm.userStatesFilter[i].selected) {
|
||||
vm.usersOptions.userStates.push(vm.userStatesFilter[i].key);
|
||||
}
|
||||
}
|
||||
|
||||
// If there are any selected userStates, update location and change pagenumber
|
||||
if (vm.usersOptions.userStates.length > 0) {
|
||||
updateLocation("userStates", vm.usersOptions.userStates.join(","));
|
||||
changePageNumber(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initUserGroupSelections() {
|
||||
|
||||
Reference in New Issue
Block a user