File tree Expand file tree Collapse file tree 5 files changed +12
-7
lines changed
packages/vue-primitives/src Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ defineExpose({
3232 >
3333 <Primitive
3434 :ref =" (el: any) => {
35- elRef = (el?.$el ?? el) || undefined
35+ const node = (el?.$el ?? el)
36+ elRef = node?.hasAttribute ? node : undefined
3637 }"
3738 :as =" as"
3839 :as-child =" asChild"
Original file line number Diff line number Diff line change @@ -78,16 +78,17 @@ watch(
7878 <Primitive
7979 :id =" context.contentId"
8080 :ref =" (el: any) => {
81- elRef = (el?.$el ?? el) || undefined
81+ const node = (el?.$el ?? el)
82+ elRef = node?.hasAttribute ? node : undefined
8283 }"
8384 :as =" as"
8485 :as-child =" asChild"
8586 :data-state =" getState(context.open.value)"
8687 :data-disabled =" context.disabled?.value ? '' : undefined"
8788 :hidden =" !isOpen"
8889 :style =" {
89- [`--oku -collapsible-content-height`]: `${height}px`,
90- [`--oku -collapsible-content-width`]: `${width}px`,
90+ [`--radix -collapsible-content-height`]: `${height}px`,
91+ [`--radix -collapsible-content-width`]: `${width}px`,
9192 }"
9293 >
9394 <slot v-if =" isOpen" />
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ defineExpose({
2626 <component
2727 :is =" asChild ? Slot : as"
2828 :ref =" (el: any) => {
29- elRef = (el?.$el ?? el) || undefined
29+ const node = (el?.$el ?? el)
30+ elRef = node?.hasAttribute ? node : undefined
3031 }"
3132 >
3233 <slot />
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ provideRovingFocusContext({
9292<template >
9393 <Primitive
9494 :ref =" (el: any) => {
95- elRef = (el?.$el ?? el) || undefined
95+ const node = (el?.$el ?? el)
96+ elRef = node?.hasAttribute ? node : undefined
9697 }"
9798 :as =" as"
9899 :as-child =" asChild"
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ const onKeydown = composeEventHandlers<KeyboardEvent>((event) => {
106106<template >
107107 <Primitive
108108 :ref =" (el: any) => {
109- elRef = (el?.$el ?? el) || undefined
109+ const node = (el?.$el ?? el)
110+ elRef = node?.hasAttribute ? node : undefined
110111 }"
111112 :as =" as"
112113 :as-child =" asChild"
You can’t perform that action at this time.
0 commit comments