@@ -27,13 +27,24 @@ function(decoratorsProvider, sfBuilderProvider, sfPathProvider) {
27
27
} ) ;
28
28
}
29
29
} ;
30
+
31
+ // Set tabArray sortOptions.items default.
32
+ var tabArray = function ( args ) {
33
+ if ( args . form . hasOwnProperty ( 'sortOptions' ) ) {
34
+ if ( ! args . form . sortOptions . hasOwnProperty ( 'items' ) ) {
35
+ args . form . sortOptions [ 'items' ] = 'li:not(:last-child)' ;
36
+ }
37
+ } else {
38
+ args . form [ 'sortOptions' ] = { items : 'li:not(:last-child)' } ;
39
+ }
40
+ }
30
41
31
42
var defaults = [ sfField , ngModel , ngModelOptions , condition ] ;
32
43
decoratorsProvider . defineDecorator ( 'bootstrapDecorator' , {
33
44
textarea : { template : base + 'textarea.html' , builder : defaults } ,
34
45
fieldset : { template : base + 'fieldset.html' , builder : [ sfField , simpleTransclusion , condition ] } ,
35
46
array : { template : base + 'array.html' , builder : [ sfField , ngModelOptions , ngModel , array , condition ] } ,
36
- tabarray : { template : base + 'tabarray.html' , builder : [ sfField , ngModelOptions , ngModel , array , condition ] } ,
47
+ tabarray : { template : base + 'tabarray.html' , builder : [ sfField , ngModelOptions , ngModel , array , condition , tabArray ] } ,
37
48
tabs : { template : base + 'tabs.html' , builder : [ sfField , ngModelOptions , tabs , condition ] } ,
38
49
section : { template : base + 'section.html' , builder : [ sfField , simpleTransclusion , condition ] } ,
39
50
conditional : { template : base + 'section.html' , builder : [ sfField , simpleTransclusion , condition ] } ,
0 commit comments