Make sure file loading indicator is propagated

This commit is contained in:
Alexis Sellier
2021-06-17 16:26:23 +02:00
parent f00d0590a1
commit 9621fa4567
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -22,6 +22,7 @@
{#if entry.info.objectType === ObjectType.Tree}
<Folder
{fetchTree}
{loading}
name={entry.info.name}
prefix={`${entry.path}/`}
currentPath={path}
+2 -1
View File
@@ -11,6 +11,7 @@
export let name: string;
export let prefix: string;
export let currentPath: string;
export let loading: string | null = null;
let expanded = currentPath.indexOf(prefix) === 0;
let tree: Promise<Tree> | null = expanded ? fetchTree(prefix) : null;
@@ -81,7 +82,7 @@
{:else}
<File
active={entry.path === currentPath}
loading={false}
loading={entry.path === loading}
name={entry.info.name}
on:click={() => {
onSelectFile({ detail: entry.path });