A little bit more styling and default expanded Side bar
This commit is contained in:
parent
c56bacc34b
commit
bf58dd15c6
@ -15,11 +15,13 @@ export default function FolderTree(props) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
// const childrenNodeIds = props.tree.children.map(aNode => {return aNode.id})
|
||||||
|
const expandedNodes = [props.tree.id]
|
||||||
return (
|
return (
|
||||||
<TreeView
|
<TreeView
|
||||||
aria-label="rich object"
|
aria-label="rich object"
|
||||||
defaultCollapseIcon={<ExpandMoreIcon />}
|
defaultCollapseIcon={<ExpandMoreIcon />}
|
||||||
defaultExpanded={['root']}
|
defaultExpanded={expandedNodes}
|
||||||
defaultExpandIcon={<ChevronRightIcon />}
|
defaultExpandIcon={<ChevronRightIcon />}
|
||||||
onNodeSelect = {(event, nodIds) => {
|
onNodeSelect = {(event, nodIds) => {
|
||||||
const currentNode = props.flattenNodes.find(aNode => {return aNode.id === nodIds})
|
const currentNode = props.flattenNodes.find(aNode => {return aNode.id === nodIds})
|
||||||
|
Loading…
Reference in New Issue
Block a user