fix(components): specify collisionPadding to all menus

This commit is contained in:
Benjamin Canac
2024-11-29 16:39:35 +01:00
parent 1240a3b604
commit 148b02464d
6 changed files with 12 additions and 12 deletions

View File

@@ -56,7 +56,7 @@ export interface SelectMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends M
selectedIcon?: string
/**
* The content of the menu.
* @defaultValue { side: 'bottom', sideOffset: 8, position: 'popper' }
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }
*/
content?: Omit<ComboboxContentProps, 'as' | 'asChild' | 'forceMount'>
/**
@@ -161,7 +161,7 @@ const appConfig = useAppConfig()
const { t } = useLocale()
const rootProps = useForwardPropsEmits(reactivePick(props, 'modelValue', 'defaultValue', 'selectedValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur'), emits)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, position: 'popper' }) as ComboboxContentProps)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }) as ComboboxContentProps)
const arrowProps = toRef(() => props.arrow as ComboboxArrowProps)
const searchInputProps = toRef(() => defu(props.searchInput, { placeholder: 'Search...', variant: 'none' }) as InputProps)