Skip to content

Commit

Permalink
fix: set inheritAttrs to false for components that render fragments (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnylost authored Oct 7, 2024
1 parent d6d0c71 commit 9d1feb7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/radix-vue/src/ConfigProvider/ConfigProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export interface ConfigProviderProps {
<script setup lang="ts">
import { toRefs } from 'vue'
defineOptions({
inheritAttrs: false,
})
const props = withDefaults(defineProps<ConfigProviderProps>(), {
dir: 'ltr',
scrollBody: true,
Expand Down
4 changes: 4 additions & 0 deletions packages/radix-vue/src/Dialog/DialogRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export const [injectDialogRootContext, provideDialogRootContext]
import { ref, toRefs } from 'vue'
import { useVModel } from '@vueuse/core'
defineOptions({
inheritAttrs: false,
})
const props = withDefaults(defineProps<DialogRootProps>(), {
open: undefined,
defaultOpen: false,
Expand Down
4 changes: 4 additions & 0 deletions packages/radix-vue/src/Popper/PopperRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export const [injectPopperRootContext, providePopperRootContext]
<script setup lang="ts">
import { ref } from 'vue'
defineOptions({
inheritAttrs: false,
})
const anchor = ref<Measurable | HTMLElement>()
providePopperRootContext({
Expand Down
4 changes: 4 additions & 0 deletions packages/radix-vue/src/Select/SelectProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import type { SelectRootContext } from './SelectRoot.vue'
import { provideSelectRootContext } from './SelectRoot.vue'
defineOptions({
inheritAttrs: false,
})
const props = defineProps<{
context: SelectRootContext
}>()
Expand Down
4 changes: 4 additions & 0 deletions packages/radix-vue/src/Toast/ToastProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export const [injectToastProviderContext, provideToastProviderContext]
<script setup lang="ts">
import { ref, toRefs } from 'vue'
defineOptions({
inheritAttrs: false,
})
const props = withDefaults(defineProps<ToastProviderProps>(), {
label: 'Notification',
duration: 5000,
Expand Down
4 changes: 4 additions & 0 deletions packages/radix-vue/src/Tooltip/TooltipProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export interface TooltipProviderProps {
import { useTimeoutFn } from '@vueuse/shared'
import { ref, toRefs } from 'vue'
defineOptions({
inheritAttrs: false,
})
const props = withDefaults(defineProps<TooltipProviderProps>(), {
delayDuration: 700,
skipDelayDuration: 300,
Expand Down

0 comments on commit 9d1feb7

Please sign in to comment.