Skip to content

Commit

Permalink
chore: cleanup component
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Mar 6, 2024
1 parent 82f6703 commit 0f7a38b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/radix-vue/src/ConfigProvider/ConfigProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export interface ConfigProviderProps {
* @type boolean | ScrollBodyOption
*/
scrollBody?: boolean | ScrollBodyOption
/**
* The global `useId` injection as a workaround for preventing hydration issue.
*/
useId?: () => string
}
</script>
Expand Down
3 changes: 1 addition & 2 deletions packages/radix-vue/src/DropdownMenu/DropdownMenuTrigger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { PrimitiveProps } from '@/Primitive'
import { useForwardExpose, useId } from '@/shared'
export interface DropdownMenuTriggerProps extends PrimitiveProps {
id?: string
/** When `true`, prevents the user from interacting with item */
disabled?: boolean
}
Expand All @@ -29,7 +28,7 @@ onMounted(() => {
rootContext.triggerElement = triggerElement
})
rootContext.triggerId ||= useId(props.id, 'radix-vue-dropdown-menu-trigger')
rootContext.triggerId ||= useId(undefined, 'radix-vue-dropdown-menu-trigger')
</script>

<template>
Expand Down
1 change: 0 additions & 1 deletion packages/radix-vue/src/Popover/PopoverContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import type {
export type PopoverContentEmits = PopoverContentImplEmits
export interface PopoverContentProps extends PopoverContentImplProps {
id?: string
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with Vue animation libraries.
Expand Down

0 comments on commit 0f7a38b

Please sign in to comment.