Skip to content

Commit

Permalink
Fix missing full width for dataset selector (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaskempf57 authored Dec 12, 2024
1 parent 9cec4e7 commit ef74107
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
18 changes: 10 additions & 8 deletions components/DatasetsSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<span class="fr-hr-or-text">{{ t('or') }}</span>
</p>
<form
class="flex items-center space-x-4"
class="flex items-end space-x-4"
@submit.prevent="loadDatasetByLink"
>
<InputGroup
Expand All @@ -45,15 +45,14 @@
:placeholder="'https://...'"
:has-error="!!datasetUrlError"
:error-text="datasetUrlError"
class="w-100"
class="w-100 !mb-0"
/>
<button
<BrandedButton
type="submit"
class="fr-btn"
:icon="RiAddLine"
size="sm"
:title="t('Add dataset')"
>
<RiAddLine />
</button>
/>
</form>
</div>
<div
Expand All @@ -72,7 +71,10 @@
>
<RiDraggable class="size-8" />
</button>
<CardLg :dataset />
<CardLg
class="flex-1"
:dataset
/>
<button
type="button"
class="fr-btn fr-btn--tertiary-no-outline shrink-0"
Expand Down
5 changes: 3 additions & 2 deletions components/SearchableSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ import {
ComboboxOption,
TransitionRoot,
} from '@headlessui/vue'
import { watchDebounced } from '@vueuse/core';
type ModelType = Multiple extends false ? T : Array<T>
Expand Down Expand Up @@ -209,7 +210,7 @@ const query = ref('')
const suggestedOptions = ref<Array<T> | null>(null)
watchEffect(async () => {
watchDebounced(query, async () => {
if (!props.suggest) return
const savedQuery = query.value
Expand All @@ -218,7 +219,7 @@ watchEffect(async () => {
if (savedQuery === query.value) {
suggestedOptions.value = options
}
})
}, { debounce: 400, maxWait: 800 })
const filteredOptions = computed<Array<T>>(() => {
if (props.suggest) {
Expand Down

0 comments on commit ef74107

Please sign in to comment.