@@ -508,7 +508,7 @@ angular.module('schemaForm').provider('schemaForm',
508
508
509
509
//Non standard attributes
510
510
if ( schema . validationMessage ) { f . validationMessage = schema . validationMessage ; }
511
- if ( schema . enumNames ) { f . titleMap = canonicalTitleMap ( schema . enumNames , schema . enum ) ; }
511
+ if ( schema . enumNames ) { f . titleMap = canonicalTitleMap ( schema . enumNames , schema [ ' enum' ] ) ; }
512
512
f . schema = schema ;
513
513
514
514
// Ng model options doesn't play nice with undefined, might be defined
@@ -518,7 +518,7 @@ angular.module('schemaForm').provider('schemaForm',
518
518
} ;
519
519
520
520
var text = function ( name , schema , options ) {
521
- if ( schema . type === 'string' && ! schema . enum ) {
521
+ if ( schema . type === 'string' && ! schema [ ' enum' ] ) {
522
522
var f = stdFormObj ( name , schema , options ) ;
523
523
f . key = options . path ;
524
524
f . type = 'text' ;
@@ -560,25 +560,25 @@ angular.module('schemaForm').provider('schemaForm',
560
560
} ;
561
561
562
562
var select = function ( name , schema , options ) {
563
- if ( schema . type === 'string' && schema . enum ) {
563
+ if ( schema . type === 'string' && schema [ ' enum' ] ) {
564
564
var f = stdFormObj ( name , schema , options ) ;
565
565
f . key = options . path ;
566
566
f . type = 'select' ;
567
567
if ( ! f . titleMap ) {
568
- f . titleMap = enumToTitleMap ( schema . enum ) ;
568
+ f . titleMap = enumToTitleMap ( schema [ ' enum' ] ) ;
569
569
}
570
570
options . lookup [ sfPathProvider . stringify ( options . path ) ] = f ;
571
571
return f ;
572
572
}
573
573
} ;
574
574
575
575
var checkboxes = function ( name , schema , options ) {
576
- if ( schema . type === 'array' && schema . items && schema . items . enum ) {
576
+ if ( schema . type === 'array' && schema . items && schema . items [ ' enum' ] ) {
577
577
var f = stdFormObj ( name , schema , options ) ;
578
578
f . key = options . path ;
579
579
f . type = 'checkboxes' ;
580
580
if ( ! f . titleMap ) {
581
- f . titleMap = enumToTitleMap ( schema . items . enum ) ;
581
+ f . titleMap = enumToTitleMap ( schema . items [ ' enum' ] ) ;
582
582
}
583
583
options . lookup [ sfPathProvider . stringify ( options . path ) ] = f ;
584
584
return f ;
@@ -1024,8 +1024,8 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
1024
1024
var len = list . length ;
1025
1025
var copy = scope . copyWithIndex ( len ) ;
1026
1026
schemaForm . traverseForm ( copy , function ( part ) {
1027
- if ( part . key && angular . isDefined ( part . default ) ) {
1028
- sfSelect ( part . key , scope . model , part . default ) ;
1027
+ if ( part . key && angular . isDefined ( part [ ' default' ] ) ) {
1028
+ sfSelect ( part . key , scope . model , part [ ' default' ] ) ;
1029
1029
}
1030
1030
} ) ;
1031
1031
0 commit comments