@@ -39,25 +39,26 @@ uis.directive('uiSelectChoices',
39
39
40
40
choices . attr ( 'ng-repeat' , parserResult . repeatExpression ( groupByExp ) )
41
41
. attr ( 'ng-if' , '$select.open' ) ; //Prevent unnecessary watches when dropdown is closed
42
-
42
+
43
43
44
44
var rowsInner = tElement . querySelectorAll ( '.ui-select-choices-row-inner' ) ;
45
45
if ( rowsInner . length !== 1 ) {
46
46
throw uiSelectMinErr ( 'rows' , "Expected 1 .ui-select-choices-row-inner but got '{0}'." , rowsInner . length ) ;
47
47
}
48
48
rowsInner . attr ( 'uis-transclude-append' , '' ) ; //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat
49
49
50
- // If IE8 then need to target rowsInner to apply the ng-click attr as choices will not capture the event.
50
+ // If IE8 then need to target rowsInner to apply the ng-click attr as choices will not capture the event.
51
51
var clickTarget = $window . document . addEventListener ? choices : rowsInner ;
52
52
clickTarget . attr ( 'ng-click' , '$select.select(' + parserResult . itemName + ',$select.skipFocusser,$event)' ) ;
53
-
53
+
54
54
return function link ( scope , element , attrs , $select ) {
55
55
56
-
56
+
57
57
$select . parseRepeatAttr ( attrs . repeat , groupByExp , groupFilterExp ) ; //Result ready at $select.parserResult
58
58
$select . disableChoiceExpression = attrs . uiDisableChoice ;
59
59
$select . onHighlightCallback = attrs . onHighlight ;
60
- $select . dropdownPosition = attrs . position ? attrs . position . toLowerCase ( ) : uiSelectConfig . dropdownPosition ;
60
+ $select . minimumInputLength = parseInt ( attrs . minimumInputLength ) || 0 ;
61
+ $select . dropdownPosition = attrs . position ? attrs . position . toLowerCase ( ) : uiSelectConfig . dropdownPosition ;
61
62
62
63
scope . $watch ( '$select.search' , function ( newValue ) {
63
64
if ( newValue && ! $select . open && $select . multiple ) $select . activate ( false , true ) ;
0 commit comments