Skip to content

Commit 62fb760

Browse files
committed
* fix(Switch): use with Tooltip
1 parent e7f2bf4 commit 62fb760

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runtime/components/Switch.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import { computed, useId } from 'vue'
5454
import { Primitive, SwitchRoot, SwitchThumb, useForwardProps, Label } from 'reka-ui'
5555
import { reactivePick } from '@vueuse/core'
5656
import { useFormField } from '../composables/useFormField'
57+
import { omit } from '../utils'
5758
import icons from '../dictionary/icons'
5859
5960
defineOptions({ inheritAttrs: false })
@@ -91,7 +92,7 @@ function onUpdate(value: any) {
9192
<div :class="b24ui.container({ class: props.b24ui?.container })">
9293
<SwitchRoot
9394
:id="id"
94-
v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
95+
v-bind="{ ...rootProps, ...omit({ ...$attrs }, ['data-state']), ...ariaAttrs }"
9596
v-model="modelValue"
9697
:name="name"
9798
:disabled="disabled || loading"

0 commit comments

Comments
 (0)