Skip to content

Instantly share code, notes, and snippets.

@ermouth
Created March 30, 2017 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ermouth/f7cdbdc146155e9293d0bfcc12e1fc5a to your computer and use it in GitHub Desktop.
Save ermouth/f7cdbdc146155e9293d0bfcc12e1fc5a to your computer and use it in GitHub Desktop.
Nested-nested
{
init:[
'<div id="list"></div>'
],
data:{
data: [
{ idfield:'abc', desc: 'parent1', children: [ { id:'fgh', desc: 'child1' }, { id:'lmn', desc: 'child2' } ] },
{ idfield:'def', desc: 'parent2', children: [ { id:'xyz', desc: 'child1' } ] }
]
},
ui:{
'#list':{
bind:'data',
list:'<div><div id="list2"></div></div>', // list item
id:['idfield'], // field(s) to generate unique row id
check:true, // should the list report errors to parent
manifest:{
// 1st level child manifest
ui:{
'#list2':{
bind:'children',
id:['id'], // field(s) to generate unique row id
list:'<div></div>', // list item
check:true,
manifest:{
//2nd level manifest
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment