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

Commit abc4ce9

Browse files
committed
fix(choices): avoid to recalculate position when set 'down'
1 parent b1415f4 commit abc4ce9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/uiSelectController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ uis.controller('uiSelectCtrl',
169169
}
170170

171171
ctrl.refreshItems = function (data){
172-
$scope.calculateDropdownPos();
173172
data = data || ctrl.parserResult.source($scope);
174173
var selectedItems = ctrl.selected;
175174
//TODO should implement for single mode removeSelected
@@ -181,6 +180,9 @@ uis.controller('uiSelectCtrl',
181180
ctrl.setItemsFn(filteredItems);
182181
}
183182
}
183+
if (ctrl.dropdownPosition === 'auto' || ctrl.dropdownPosition === 'up'){
184+
$scope.calculateDropdownPos();
185+
}
184186
};
185187

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

0 commit comments

Comments
 (0)