File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 36
36
/>
37
37
</div >
38
38
</div >
39
- <teleport to =" body" v-if =" teleportToBody && showDropdown" >
40
- <div ref =" dropdownEl" :style =" getDropdownPosition" :class =" {'shadow-none': isTop}"
41
- class =" fixed z-[5] w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700
39
+ <teleport to =" body" v-if =" ( teleportToBody || teleportToTop) && showDropdown" >
40
+ <div ref =" dropdownEl" :style =" getDropdownPosition" :class =" {'shadow-none': isTop, 'z-[5]': teleportToBody, 'z-[1000]': teleportToTop }"
41
+ class =" fixed w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700
42
42
dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
43
43
@scroll =" handleDropdownScroll" >
44
44
<div
61
61
</div >
62
62
</teleport >
63
63
64
- <div v-if =" !teleportToBody && showDropdown" ref =" dropdownEl" :style =" dropdownStyle" :class =" {'shadow-none': isTop}"
64
+ <div v-if =" !teleportToBody && !teleportToTop && showDropdown" ref =" dropdownEl" :style =" dropdownStyle" :class =" {'shadow-none': isTop}"
65
65
class =" absolute z-10 mt-1 w-full bg-lightDropdownOptionsBackground shadow-lg text-lightDropdownButtonsText dark:shadow-black dark:bg-darkDropdownOptionsBackground
66
66
dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
67
67
@scroll =" handleDropdownScroll" >
@@ -143,6 +143,10 @@ const props = defineProps({
143
143
type: Boolean ,
144
144
default: false ,
145
145
},
146
+ teleportToTop: {
147
+ type: Boolean ,
148
+ default: false ,
149
+ },
146
150
});
147
151
148
152
const emit = defineEmits ([' update:modelValue' , ' scroll-near-end' , ' search' ]);
You can’t perform that action at this time.
0 commit comments