MCPcopy Create free account
hub / github.com/adobe/react-spectrum / DynamicTree

Function DynamicTree

packages/react-aria-components/test/Tree.test.tsx:301–325  ·  view source on GitHub ↗
({treeProps = {}, rowProps = {}})

Source from the content-addressed store, hash-verified

299};
300
301let DynamicTree = ({treeProps = {}, rowProps = {}}) => (
302 <Tree
303 defaultExpandedKeys={
304 new Set([
305 'projects',
306 'project-2',
307 'project-5',
308 'reports',
309 'reports-1',
310 'reports-1A',
311 'reports-1AB'
312 ])
313 }
314 aria-label="test dynamic tree"
315 items={rows}
316 onExpandedChange={onExpandedChange}
317 onSelectionChange={onSelectionChange}
318 {...treeProps}>
319 {(item: any) => (
320 <DynamicTreeItem childItems={item.childItems} textValue={item.name} {...rowProps}>
321 {item.name}
322 </DynamicTreeItem>
323 )}
324 </Tree>
325);
326
327let DynamicSectionTree = ({treeProps = {}, rowProps = {}}) => (
328 <Tree

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected