no results case
This commit is contained in:
parent
30cbcff1b1
commit
cc87213071
|
@ -30,6 +30,8 @@
|
||||||
return lowerA > lowerB ? 1 : -1
|
return lowerA > lowerB ? 1 : -1
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$: showNoResults = searchString && !filteredAutomations.length
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
try {
|
try {
|
||||||
await automationStore.actions.fetch()
|
await automationStore.actions.fetch()
|
||||||
|
@ -53,18 +55,18 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="side-bar-nav">
|
<div class="side-bar-nav">
|
||||||
{#if filteredAutomations.length}
|
{#each filteredAutomations as automation}
|
||||||
{#each filteredAutomations as automation}
|
<NavItem
|
||||||
<NavItem
|
text={automation.name}
|
||||||
text={automation.name}
|
selected={automation._id === selectedAutomationId}
|
||||||
selected={automation._id === selectedAutomationId}
|
on:click={() => selectAutomation(automation._id)}
|
||||||
on:click={() => selectAutomation(automation._id)}
|
selectedBy={$userSelectedResourceMap[automation._id]}
|
||||||
selectedBy={$userSelectedResourceMap[automation._id]}
|
>
|
||||||
>
|
<EditAutomationPopover {automation} />
|
||||||
<EditAutomationPopover {automation} />
|
</NavItem>
|
||||||
</NavItem>
|
{/each}
|
||||||
{/each}
|
|
||||||
{:else}
|
{#if showNoResults}
|
||||||
<Layout paddingY="none" paddingX="L">
|
<Layout paddingY="none" paddingX="L">
|
||||||
<div class="no-results">
|
<div class="no-results">
|
||||||
There aren't any automations matching that name
|
There aren't any automations matching that name
|
||||||
|
|
Loading…
Reference in New Issue