This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree 3 files changed +32
-0
lines changed
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,22 @@ uis.directive('uiSelect',
221
221
if ( transcludedNoChoice . length == 1 ) {
222
222
element . querySelectorAll ( '.ui-select-no-choice' ) . replaceWith ( transcludedNoChoice ) ;
223
223
}
224
+
225
+ var transcludedHeader = transcluded . querySelectorAll ( '.ui-select-header' ) ;
226
+ if ( transcludedHeader && transcludedHeader . length ) {
227
+ transcludedHeader . removeAttr ( 'ui-select-header' ) ; //To avoid loop in case directive as attr
228
+ transcludedHeader . removeAttr ( 'data-ui-select-header' ) ; // Properly handle HTML5 data-attributes
229
+ $timeout ( function ( ) {
230
+ transcludedChoices . prepend ( transcludedHeader ) ;
231
+ } ) ;
232
+ }
233
+
234
+ var transcludedFooter = transcluded . querySelectorAll ( '.ui-select-footer' ) ;
235
+ if ( transcludedFooter && transcludedFooter . length ) {
236
+ transcludedFooter . removeAttr ( 'ui-select-footer' ) ; //To avoid loop in case directive as attr
237
+ transcludedFooter . removeAttr ( 'data-ui-select-footer' ) ; // Properly handle HTML5 data-attributes
238
+ transcludedChoices . append ( transcludedFooter ) ;
239
+ }
224
240
} ) ;
225
241
226
242
// Support for appending the select field to the body when its open
Original file line number Diff line number Diff line change
1
+ uis . directive ( 'uiSelectFooter' , function ( ) {
2
+ return {
3
+ template : '<li class="ui-select-footer" ng-transclude></li>' ,
4
+ restrict : 'EA' ,
5
+ transclude : true ,
6
+ replace : true
7
+ } ;
8
+ } ) ;
Original file line number Diff line number Diff line change
1
+ uis . directive ( 'uiSelectHeader' , function ( ) {
2
+ return {
3
+ template : '<li class="ui-select-header" ng-transclude></li>' ,
4
+ restrict : 'EA' ,
5
+ transclude : true ,
6
+ replace : true
7
+ } ;
8
+ } ) ;
You can’t perform that action at this time.
0 commit comments