Fix issue when currentAsset is null and fix overflow when no screens for current role
This commit is contained in:
parent
53ce97b9de
commit
0ffd080b0f
2 changed files with 3 additions and 4 deletions
|
@ -33,7 +33,7 @@ export const selectedComponentPath = derived(
|
||||||
[store, currentAsset],
|
[store, currentAsset],
|
||||||
([$store, $currentAsset]) => {
|
([$store, $currentAsset]) => {
|
||||||
return findComponentPath(
|
return findComponentPath(
|
||||||
$currentAsset.props,
|
$currentAsset?.props,
|
||||||
$store.selectedComponentId
|
$store.selectedComponentId
|
||||||
).map(component => component._id)
|
).map(component => component._id)
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,11 +55,10 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="root">
|
<div class="root" class:has-screens={!!paths?.length}>
|
||||||
{#each paths as path, idx (path)}
|
{#each paths as path, idx (path)}
|
||||||
<PathTree border={idx > 0} {path} route={routes[path]} />
|
<PathTree border={idx > 0} {path} route={routes[path]} />
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
{#if !paths.length}
|
{#if !paths.length}
|
||||||
<div class="empty">
|
<div class="empty">
|
||||||
There aren't any screens configured with this access role.
|
There aren't any screens configured with this access role.
|
||||||
|
@ -68,7 +67,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.root {
|
.root.has-screens {
|
||||||
min-width: max-content;
|
min-width: max-content;
|
||||||
}
|
}
|
||||||
div.empty {
|
div.empty {
|
||||||
|
|
Loading…
Reference in a new issue