We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d935722 commit 478796cCopy full SHA for 478796c
src/select.js
@@ -129,6 +129,10 @@ angular.module('ui.select', [])
129
function _resetSearchInput() {
130
if (ctrl.resetSearchInput) {
131
ctrl.search = EMPTY_SEARCH;
132
+ //reset activeIndex
133
+ if (ctrl.selected && ctrl.items.length) {
134
+ ctrl.activeIndex = ctrl.items.indexOf(ctrl.selected);
135
+ }
136
}
137
138
@@ -200,10 +204,6 @@ angular.module('ui.select', [])
200
204
// Closes the dropdown
201
205
ctrl.close = function() {
202
206
if (ctrl.open) {
203
- //reset activeIndex
- if (ctrl.selected && ctrl.items.length) {
- ctrl.activeIndex = ctrl.items.indexOf(ctrl.selected);
- }
207
_resetSearchInput();
208
ctrl.open = false;
209
0 commit comments