Skip to content

Commit 100d012

Browse files
authored
Merge pull request #284 from devforth/AdminForth/727
fix: fix incorrect position of dropdown content
2 parents 780a733 + c4c1486 commit 100d012

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

adminforth/spa/src/afcl/Select.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
</template>
111111

112112
<script setup lang="ts">
113-
import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue';
113+
import { ref, computed, onMounted, onUnmounted, watch, nextTick, type Ref } from 'vue';
114114
import { IconCaretDownSolid } from '@iconify-prerendered/vue-flowbite';
115115
import { useElementSize } from '@vueuse/core'
116116
@@ -175,14 +175,17 @@ function updateFromProps() {
175175
}
176176
}
177177
178-
function inputClick() {
178+
async function inputClick() {
179179
if (props.readonly) return;
180180
// Toggle local dropdown
181181
showDropdown.value = !showDropdown.value;
182182
// If the dropdown is about to close, reset the search
183183
if (!showDropdown.value && !search.value) {
184184
search.value = '';
185185
}
186+
187+
await nextTick();
188+
handleScroll();
186189
}
187190
188191
watch(

0 commit comments

Comments
 (0)