MCPcopy Create free account
hub / github.com/neomjs/neo / createExampleComponent

Method createExampleComponent

examples/sitemap/MainContainer.mjs:37–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 createExampleComponent() {
38 return Neo.create(SiteMapComponent, {
39 height: 600,
40 width : 800,
41
42 myHandler(record) {
43 console.log('myHandler', record);
44 },
45
46 store: {
47 data: [
48 {id: 1, column: 0, name: 'Group 1', level: 0},
49 {id: 2, column: 0, name: 'Item 1', level: 1, action: 'item1'},
50 {id: 3, column: 0, name: 'Item 2', level: 1, action: 'item2'},
51 {id: 4, column: 0, name: 'Item 3', level: 2, action: 'https://github.com/neomjs/neo', actionType: 'url'},
52 {id: 5, column: 0, name: 'Item 4', level: 2, disabled: true},
53 {id: 6, column: 1, name: 'Group 2', level: 0},
54 {id: 7, column: 1, name: 'Item 1', level: 1, action: 'myHandler', actionType: 'handler'},
55 {id: 8, column: 1, name: 'Item 2', level: 1, hidden: true},
56 {id: 9, column: 1, name: 'Item 3', level: 1},
57 {id: 10, column: 1, name: 'Item 4', level: 2}
58 ]
59 }
60 })
61 }
62}
63
64export default Neo.setupClass(MainContainer);

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected