flattentree
bunsenstraat 11 months ago
parent 6901d2cd62
commit ab27d381a2
  1. 4
      libs/remix-ui/workspace/src/lib/components/flat-tree.tsx

@ -76,6 +76,10 @@ export const FlatTree = (props: FlatTreeProps) => {
const getIndentLevelDiv = (path: string) => { const getIndentLevelDiv = (path: string) => {
// remove double slash
path = path.replace(/\/\//g, '/')
// remove leading slash
path = path.replace(/^\//g, '')
const pathArray = path.split('/') const pathArray = path.split('/')
const level = pathArray.length - 1 const level = pathArray.length - 1
const indent = level * 10 const indent = level * 10

Loading…
Cancel
Save