Skip to content

Commit

Permalink
Scroll fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonL9vov committed May 15, 2024
1 parent 82c6e11 commit 07d886d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue3-hive-ui-kit",
"private": false,
"version": "0.7.25-alpha",
"version": "0.7.26",
"type": "module",
"description": "UI kit for Vue 3",
"files": [
Expand Down
7 changes: 6 additions & 1 deletion src/components/hive-drop-down/hive-drop-down.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ onMounted(() => {
});
defineExpose({ current });
const onScroll = () => {
searchRef.value?.forceFocus();
};
</script>

<template>
Expand Down Expand Up @@ -136,8 +140,8 @@ defineExpose({ current });
@keydown.up.prevent="setPrevActiveValue"
@keydown.down.prevent="setNextActiveValue"
@input="onSearch<string>(emit, $event as string)"
@focusout="collapse(), onFocusout(emit)"
/>
<!-- @focusout="collapse(), onFocusout(emit)" -->
<i class="hive-drop-down__icon" :class="{ expand: isExpanded }" @mousedown="toggle" />
</div>
<transition name="fade" appear>
Expand All @@ -148,6 +152,7 @@ defineExpose({ current });
:style="{
maxHeight: menuHeight,
}"
@scroll="onScroll"
>
<div
v-for="(item, i) in filteredOptions"
Expand Down

0 comments on commit 07d886d

Please sign in to comment.