Skip to content

Commit eab0383

Browse files
committed
Ensure scrollbar doesn't overlap with options
1 parent 25e7861 commit eab0383

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

resources/js/components/ui/Combobox/Combobox.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ defineExpose({
447447
<ComboboxViewport
448448
ref="viewport"
449449
class="max-h-[calc(var(--reka-combobox-content-available-height)-5rem)] overflow-y-scroll"
450+
:class="{ 'pr-3': scrollbarRef?.isVisible }"
450451
data-ui-combobox-viewport
451452
>
452453
<ComboboxEmpty class="p-2 text-sm" data-ui-combobox-empty>

resources/js/components/ui/Combobox/Scrollbar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,14 @@ onUnmounted(() => {
109109
110110
defineExpose({
111111
update,
112+
isVisible,
112113
});
113114
</script>
114115
115116
<template>
116-
<div v-if="isVisible" class="absolute top-0 right-0 w-3 p-0.5 h-full pointer-events-none">
117+
<div v-if="isVisible" class="absolute top-0 right-0 w-[6px] py-1 px-0.5 h-full pointer-events-none">
117118
<div
118-
class="absolute right-0 w-1.5 rounded-full bg-black/25 hover:bg-black/40 dark:bg-white/25 dark:hover:bg-white/40 transition-colors pointer-events-auto cursor-pointer"
119+
class="absolute right-0 w-1.5 rounded-md bg-black/25 hover:bg-black/40 dark:bg-white/25 dark:hover:bg-white/40 transition-colors pointer-events-auto cursor-pointer"
119120
:class="{ 'bg-black/40 dark:bg-white/40': isDragging }"
120121
:style="{
121122
height: `${thumbHeight}%`,

0 commit comments

Comments
 (0)