Created
March 30, 2017 16:37
-
-
Save ermouth/f7cdbdc146155e9293d0bfcc12e1fc5a to your computer and use it in GitHub Desktop.
Nested-nested
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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