Skip to content
Snippets Groups Projects
Commit 8006f1b2 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat(ComboBox): allow external control of loading indicator

parent e37b1166
No related branches found
No related tags found
No related merge requests found
......@@ -50,8 +50,8 @@
@keydown.delete="maybeRemoveChoice"
/>
<icon-gg-spinner
class="tw-animate-spin"
:class="{ 'tw-invisible': !isResolvingChoice }"
class="tw-animate-spin tw-absolute tw-right-3"
:class="{ 'tw-invisible': !((isOpen && isLoading) || isResolvingChoice) }"
role="presentation"
/>
</div>
......@@ -151,6 +151,7 @@ export type ComboBoxProps<T> = {
keyboardShortcutClass?: unknown
labelClass?: unknown
drawerClass?: unknown
isLoading?: boolean
// TODO: this fixes errors with arbitrary attributes (like data-*), but
// is just a workaround for https://github.com/vuejs/core/issues/8372
// eslint-disable-next-line @typescript-eslint/no-explicit-any
......@@ -208,6 +209,7 @@ const props = withDefaults(defineProps<ComboBoxProps<T>>(), {
keyboardShortcutClass: undefined,
drawerClass: undefined,
choiceListClass: undefined,
isLoading: false,
})
const emit = defineEmits<{
(e: 'search', value: string): void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment