@@ -45,11 +45,10 @@ angular.module('schemaForm').provider('schemaForm',['sfPathProvider', function(s
45
45
var stdFormObj = function ( name , schema , options ) {
46
46
options = options || { } ;
47
47
var f = options . global && options . global . formDefaults ? angular . copy ( options . global . formDefaults ) : { } ;
48
-
49
48
if ( options . global && options . global . supressPropertyTitles === true ) {
50
49
f . title = schema . title ;
51
50
} else {
52
- f . title = schema . title || name [ 0 ] ;
51
+ f . title = schema . title || name ;
53
52
}
54
53
55
54
if ( schema . description ) f . description = schema . description ;
@@ -193,7 +192,7 @@ angular.module('schemaForm').provider('schemaForm',['sfPathProvider', function(s
193
192
var arrPath = options . path . slice ( ) ;
194
193
arrPath . push ( '' ) ;
195
194
196
- f . items = [ defaultFormDefinition ( options . path , schema . items , {
195
+ f . items = [ defaultFormDefinition ( name , schema . items , {
197
196
path : arrPath ,
198
197
required : required || false ,
199
198
lookup : options . lookup ,
@@ -355,11 +354,10 @@ angular.module('schemaForm').provider('schemaForm',['sfPathProvider', function(s
355
354
356
355
if ( schema . type === "object" ) {
357
356
angular . forEach ( schema . properties , function ( v , k ) {
358
- k = [ k ] ;
359
357
if ( ignore [ k ] !== true ) {
360
358
var required = schema . required && schema . required . indexOf ( k [ k . length - 1 ] ) !== - 1 ;
361
359
var def = defaultFormDefinition ( k , v , {
362
- path : k , //path to this property in dot notation. Root object has no name
360
+ path : [ k ] , //path to this property in bracket notation. Root object has no name
363
361
lookup : lookup , //extra map to register with. Optimization for merger.
364
362
ignore : ignore , //The ignore list of paths (sans root level name)
365
363
required : required , //Is it required? (v4 json schema style)
0 commit comments