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

Function StaticSectionTree

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

Source from the content-addressed store, hash-verified

110);
111
112let StaticSectionTree = ({treeProps = {}, rowProps = {}}) => (
113 <Tree
114 defaultExpandedKeys={new Set(['projects', 'projects-1'])}
115 disabledBehavior="selection"
116 aria-label="test tree"
117 onExpandedChange={onExpandedChange}
118 onSelectionChange={onSelectionChange}
119 {...treeProps}>
120 <TreeSection aria-label="Section 1">
121 <StaticTreeItem id="Photos" textValue="Photos" {...rowProps}>
122 Photos
123 </StaticTreeItem>
124 </TreeSection>
125 <TreeSection>
126 <TreeHeader>Section 2</TreeHeader>
127 <StaticTreeItem id="projects" textValue="Projects" title="Projects" {...rowProps}>
128 <StaticTreeItem id="projects-1" textValue="Projects-1" title="Projects-1" {...rowProps}>
129 <StaticTreeItem id="projects-1A" textValue="Projects-1A" {...rowProps}>
130 Projects-1A
131 </StaticTreeItem>
132 </StaticTreeItem>
133 <StaticTreeItem id="projects-2" textValue="Projects-2" {...rowProps}>
134 Projects-2
135 </StaticTreeItem>
136 <StaticTreeItem id="projects-3" textValue="Projects-3" {...rowProps}>
137 Projects-3
138 </StaticTreeItem>
139 </StaticTreeItem>
140 </TreeSection>
141 </Tree>
142);
143
144let rows = [
145 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected