MCPcopy Create free account
hub / github.com/OpenSN-Library/OpenSN-Library / transTreeData

Function transTreeData

ui/src/Page/DatabasePage.js:48–59  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

46 },[])
47
48 const transTreeData = (data) => {
49 const res = []
50 Object.keys(data).forEach((key)=>{
51 const item = data[key]
52 res.push({
53 key:data[key].realKey,
54 title:key,
55 children:transTreeData(item.children)
56 })
57 })
58 return res
59 }
60
61 const onSelect = (selectedKeys, info) => {
62 console.log('selected', selectedKeys, info);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected