Browse Source

Fix issue when currentAsset is null and fix overflow when no screens for current role

master
Andrew Kingston 5 years ago
parent
commit
3d0328e65e
  1. 2
      packages/builder/src/builderStore/index.js
  2. 5
      packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte

2
packages/builder/src/builderStore/index.js

@ -33,7 +33,7 @@ export const selectedComponentPath = derived(
[store, currentAsset],
([$store, $currentAsset]) => {
return findComponentPath(
$currentAsset.props,
$currentAsset?.props,
$store.selectedComponentId
).map(component => component._id)
}

5
packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte

@ -55,11 +55,10 @@
}
</script>
<div class="root">
<div class="root" class:has-screens={!!paths?.length}>
{#each paths as path, idx (path)}
<PathTree border={idx > 0} {path} route={routes[path]} />
{/each}
{#if !paths.length}
<div class="empty">
There aren't any screens configured with this access role.
@ -68,7 +67,7 @@
</div>
<style>
.root {
.root.has-screens {
min-width: max-content;
}
div.empty {

Loading…
Cancel
Save