always unfolded & no label on root

pull/866/head
yann300 4 years ago
parent 3ed12e16b7
commit 5214496dcb
  1. 2
      libs/remix-ui/file-explorer/src/lib/file-explorer-menu.tsx
  2. 5
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx

@ -45,7 +45,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
return ( return (
<> <>
<span className='remixui_label' title={props.title} data-path={props.title} style={{ fontWeight: 'bold' }}>{ '/' }</span> <span className='remixui_label' title={props.title} data-path={props.title} style={{ fontWeight: 'bold' }}>{ props.title }</span>
<span className="remixui_menu">{ <span className="remixui_menu">{
state.menuItems.map(({ action, title, icon }, index) => { state.menuItems.map(({ action, title, icon }, index) => {
if (action === 'uploadFile') { if (action === 'uploadFile') {

@ -1022,6 +1022,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
<div> <div>
<TreeView id='treeView'> <TreeView id='treeView'>
<TreeViewItem id="treeViewItem" <TreeViewItem id="treeViewItem"
controlBehaviour={true}
label={ label={
<div onClick={(e) => { <div onClick={(e) => {
e.stopPropagation() e.stopPropagation()
@ -1038,7 +1039,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
plugin.resetFocus(true) plugin.resetFocus(true)
}}> }}>
<FileExplorerMenu <FileExplorerMenu
title={name} title={''}
menuItems={props.menuItems} menuItems={props.menuItems}
createNewFile={handleNewFileInput} createNewFile={handleNewFileInput}
createNewFolder={handleNewFolderInput} createNewFolder={handleNewFolderInput}
@ -1048,7 +1049,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
/> />
</div> </div>
} }
expand={state.expandPath.includes(props.name)}> expand={true}>
<div className='pb-2'> <div className='pb-2'>
<TreeView id='treeViewMenu'> <TreeView id='treeViewMenu'>
{ {

Loading…
Cancel
Save