Display loader

This commit is contained in:
Adria Navarro 2023-09-22 14:03:23 +02:00
parent b391ca37ab
commit c814e51e36
4 changed files with 16 additions and 0 deletions

View File

@ -20,6 +20,7 @@
export let customPopoverOffsetBelow
export let customPopoverMaxHeight
export let open = false
export let loading
const dispatch = createEventDispatcher()
@ -103,4 +104,5 @@
{customPopoverHeight}
{customPopoverOffsetBelow}
{customPopoverMaxHeight}
{loading}
/>

View File

@ -10,6 +10,7 @@
import Popover from "../../Popover/Popover.svelte"
import Tags from "../../Tags/Tags.svelte"
import Tag from "../../Tags/Tag.svelte"
import ProgressCircle from "../../ProgressCircle/ProgressCircle.svelte"
export let id = null
export let disabled = false
@ -43,6 +44,7 @@
export let align = "left"
export let footer = null
export let customAnchor = null
export let loading
const dispatch = createEventDispatcher()
@ -260,6 +262,11 @@
</li>
{/each}
{/if}
{#if loading}
<li class="spectrum-Menu-item loading">
<ProgressCircle size="S" />
</li>
{/if}
</ul>
{#if footer}
@ -373,4 +380,8 @@
.option-tag :global(.spectrum-Tags-item > .spectrum-Icon) {
margin-top: 2px;
}
.loading {
justify-content: center;
}
</style>

View File

@ -26,6 +26,7 @@
export let customPopoverOffsetBelow
export let customPopoverMaxHeight
export let searchTerm = null
export let loading
const dispatch = createEventDispatcher()
@ -95,4 +96,5 @@
placeholderOption={placeholder === false ? null : placeholder}
isOptionSelected={option => option === value}
onSelectOption={selectOption}
{loading}
/>

View File

@ -154,6 +154,7 @@
sort
useFetch={false}
bind:searchTerm
loading={$fetch.loading}
/>
{/if}
</Field>