@@ -19,9 +19,12 @@ uis.directive('uiSelect',
19
19
20
20
//Multiple or Single depending if multiple attribute presence
21
21
if ( angular . isDefined ( tAttrs . multiple ) )
22
- tElement . append ( " <ui-select-multiple/>" ) . removeAttr ( 'multiple' ) ;
22
+ tElement . append ( ' <ui-select-multiple/>' ) . removeAttr ( 'multiple' ) ;
23
23
else
24
- tElement . append ( "<ui-select-single/>" ) ;
24
+ tElement . append ( '<ui-select-single/>' ) ;
25
+
26
+ if ( tAttrs . inputId )
27
+ tElement . querySelectorAll ( 'input.ui-select-search' ) [ 0 ] . id = tAttrs . inputId ;
25
28
26
29
return function ( scope , element , attrs , ctrls , transcludeFn ) {
27
30
@@ -43,7 +46,7 @@ uis.directive('uiSelect',
43
46
44
47
$select . onSelectCallback = $parse ( attrs . onSelect ) ;
45
48
$select . onRemoveCallback = $parse ( attrs . onRemove ) ;
46
-
49
+
47
50
//Limit the number of selections allowed
48
51
$select . limit = ( angular . isDefined ( attrs . limit ) ) ? parseInt ( attrs . limit , 10 ) : undefined ;
49
52
@@ -56,8 +59,8 @@ uis.directive('uiSelect',
56
59
57
60
if ( attrs . tabindex ) {
58
61
attrs . $observe ( 'tabindex' , function ( value ) {
59
- $select . focusInput . attr ( " tabindex" , value ) ;
60
- element . removeAttr ( " tabindex" ) ;
62
+ $select . focusInput . attr ( ' tabindex' , value ) ;
63
+ element . removeAttr ( ' tabindex' ) ;
61
64
} ) ;
62
65
}
63
66
0 commit comments