We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80d90da commit d935722Copy full SHA for d935722
src/select.js
@@ -200,6 +200,10 @@ angular.module('ui.select', [])
200
// Closes the dropdown
201
ctrl.close = function() {
202
if (ctrl.open) {
203
+ //reset activeIndex
204
+ if (ctrl.selected && ctrl.items.length) {
205
+ ctrl.activeIndex = ctrl.items.indexOf(ctrl.selected);
206
+ }
207
_resetSearchInput();
208
ctrl.open = false;
209
}
@@ -284,7 +288,7 @@ angular.module('ui.select', [])
284
288
}])
285
289
286
290
.directive('uiSelect',
287
- ['$document', 'uiSelectConfig', 'uiSelectMinErr',
291
+ ['$document', 'uiSelectConfig', 'uiSelectMinErr',
292
function($document, uiSelectConfig, uiSelectMinErr) {
293
294
return {
0 commit comments