Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
fix(choices): avoid to recalculate position when set 'down'
Browse files Browse the repository at this point in the history
  • Loading branch information
dimirc committed Sep 30, 2015
1 parent b1415f4 commit abc4ce9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/uiSelectController.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ uis.controller('uiSelectCtrl',
}

ctrl.refreshItems = function (data){
$scope.calculateDropdownPos();
data = data || ctrl.parserResult.source($scope);
var selectedItems = ctrl.selected;
//TODO should implement for single mode removeSelected
Expand All @@ -181,6 +180,9 @@ uis.controller('uiSelectCtrl',
ctrl.setItemsFn(filteredItems);
}
}
if (ctrl.dropdownPosition === 'auto' || ctrl.dropdownPosition === 'up'){
$scope.calculateDropdownPos();
}
};

// See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L259
Expand Down

0 comments on commit abc4ce9

Please sign in to comment.