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

Commit 45f4f52

Browse files
author
Brian Feister
committed
Merge branch 'master' of github.com:angular-ui/ui-select
2 parents 3991091 + 67ebfe6 commit 45f4f52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/select.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@
137137
* put as much logic in the controller (instead of the link functions) as possible so it can be easily tested.
138138
*/
139139
.controller('uiSelectCtrl',
140-
['$scope', '$element', '$timeout', 'RepeatParser', 'uiSelectMinErr',
141-
function($scope, $element, $timeout, RepeatParser, uiSelectMinErr) {
140+
['$scope', '$element', '$timeout', 'RepeatParser', 'uiSelectMinErr', 'uiSelectConfig',
141+
function($scope, $element, $timeout, RepeatParser, uiSelectMinErr, uiSelectConfig) {
142142

143143
var ctrl = this;
144144

@@ -172,7 +172,7 @@
172172

173173
// Most of the time the user does not want to empty the search input when in typeahead mode
174174
function _resetSearchInput() {
175-
if (ctrl.resetSearchInput) {
175+
if (ctrl.resetSearchInput || (ctrl.resetSearchInput === undefined && uiSelectConfig.resetSearchInput)) {
176176
ctrl.search = EMPTY_SEARCH;
177177
//reset activeIndex
178178
if (ctrl.selected && ctrl.items.length && !ctrl.multiple) {

0 commit comments

Comments
 (0)