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

Commit 67ebfe6

Browse files
committed
Merge pull request #399 from phxdatasec/feat-globalResetOption
Fix for #397
2 parents 0762368 + e0b5845 commit 67ebfe6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/select.js

+3-3
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)