We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
shallowRef
1 parent 70affdc commit 4d3ef43Copy full SHA for 4d3ef43
1 file changed
app/components/PackagePlaygrounds.vue
@@ -1,5 +1,4 @@
1
<script setup lang="ts">
2
-import { onClickOutside } from '@vueuse/core'
3
import type { PlaygroundLink } from '#shared/types'
4
5
const props = defineProps<{
@@ -41,10 +40,10 @@ function getColor(provider: string): string {
41
40
}
42
43
// Dropdown state
44
-const isOpen = ref(false)
45
-const dropdownRef = ref<HTMLElement>()
46
-const menuRef = ref<HTMLElement>()
47
-const focusedIndex = ref(-1)
+const isOpen = shallowRef(false)
+const dropdownRef = useTemplateRef('dropdownRef')
+const menuRef = useTemplateRef('menuRef')
+const focusedIndex = shallowRef(-1)
48
49
onClickOutside(dropdownRef, () => {
50
isOpen.value = false
0 commit comments