WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 198d97a

Browse files
committed
fix: adjust grid gap and add teleportToTop for select components
1 parent 1107c4a commit 198d97a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

custom/FiltersArea.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
{{ isExpanded ? 'Hide filters' : 'Show filters' }}
99
</p>
1010
</div>
11-
<div v-if="isExpanded" class="md:grid md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-6 gap-4 w-full">
11+
<div v-if="isExpanded" class="md:grid md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-6 gap-2 w-full">
1212
<div class="flex flex-col" v-for="c in columnsWithFilter" :key="c">
1313
<div class="min-w-48">
14-
<p class="dark:text-gray-400">{{ c.label }}</p>
14+
<p class="dark:text-gray-400 text-sm">{{ c.label }}</p>
1515
<Select
1616
:teleportToBody="true"
1717
v-if="c.foreignResource"
@@ -27,6 +27,7 @@
2727
}"
2828
@update:modelValue="onFilterInput[c.name]({ column: c, operator: c.filterOptions.multiselect ? 'in' : 'eq', value: c.filterOptions.multiselect ? ($event.length ? $event : undefined) : $event || undefined })"
2929
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value || (c.filterOptions.multiselect ? [] : '')"
30+
:teleportToTop="true"
3031
>
3132
<template #extra-item v-if="columnLoadingState[c.name]?.loading">
3233
<div class="text-center text-gray-400 dark:text-gray-300 py-2 flex items-center justify-center gap-2">
@@ -50,6 +51,7 @@
5051
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value !== undefined
5152
? filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value
5253
: (c.filterOptions.multiselect ? [] : '')"
54+
:teleportToTop="true"
5355
/>
5456

5557
<Select
@@ -60,6 +62,7 @@
6062
:options="c.enum"
6163
@update:modelValue="onFilterInput[c.name]({ column: c, operator: c.filterOptions.multiselect ? 'in' : 'eq', value: c.filterOptions.multiselect ? ($event.length ? $event : undefined) : $event || undefined })"
6264
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value || (c.filterOptions.multiselect ? [] : '')"
65+
:teleportToTop="true"
6366
/>
6467

6568
<Input

0 commit comments

Comments
 (0)