From 06e8a9e912ff01e62340422d38d347b41f69388b Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 9 Jul 2024 17:02:34 +0200 Subject: [PATCH] chore(CommandPalette/InputMenu/SelectMenu): proxy `selectedValue` prop from `Combobox` --- src/runtime/components/CommandPalette.vue | 4 ++-- src/runtime/components/InputMenu.vue | 4 ++-- src/runtime/components/SelectMenu.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index 7ae3d791..7a17bf06 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -36,7 +36,7 @@ export interface CommandPaletteGroup { highlightedIcon?: string } -export interface CommandPaletteProps extends Pick, Pick { +export interface CommandPaletteProps extends Pick, Pick { /** * The element or component this component should render as. * @defaultValue 'div' @@ -113,7 +113,7 @@ const slots = defineSlots>() const searchTerm = defineModel('searchTerm', { default: '' }) const appConfig = useAppConfig() -const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'disabled', 'multiple', 'modelValue', 'defaultValue'), emits) +const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'disabled', 'multiple', 'modelValue', 'defaultValue', 'selectedValue', 'resetSearchTermOnBlur'), emits) const inputProps = useForwardProps(reactivePick(props, 'loading', 'loadingIcon', 'placeholder')) // eslint-disable-next-line vue/no-dupe-keys diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index 9f9d87f9..cb280f67 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -27,7 +27,7 @@ export interface InputMenuItem extends Pick { type InputMenuVariants = VariantProps -export interface InputMenuProps extends Pick, 'modelValue' | 'defaultValue' | 'open' | 'defaultOpen' | 'searchTerm' | 'multiple' | 'disabled' | 'name' | 'resetSearchTermOnBlur'>, UseComponentIconsProps { +export interface InputMenuProps extends Pick, 'modelValue' | 'defaultValue' | 'selectedValue' | 'open' | 'defaultOpen' | 'searchTerm' | 'multiple' | 'disabled' | 'name' | 'resetSearchTermOnBlur'>, UseComponentIconsProps { /** * The element or component this component should render as. * @defaultValue 'div' @@ -131,7 +131,7 @@ const slots = defineSlots>() const searchTerm = defineModel('searchTerm', { default: '' }) const appConfig = useAppConfig() -const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur'), emits) +const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'selectedValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur'), emits) const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, position: 'popper' }) as ComboboxContentProps) const { emitFormBlur, emitFormChange, emitFormInput, size: formGroupSize, color, id, name, highlight, disabled } = useFormField(props) const { orientation, size: buttonGroupSize } = useButtonGroup(props) diff --git a/src/runtime/components/SelectMenu.vue b/src/runtime/components/SelectMenu.vue index e4c61808..999fe285 100644 --- a/src/runtime/components/SelectMenu.vue +++ b/src/runtime/components/SelectMenu.vue @@ -26,7 +26,7 @@ export interface SelectMenuItem extends Pick { type SelectMenuVariants = VariantProps -export interface SelectMenuProps extends Pick, 'modelValue' | 'defaultValue' | 'open' | 'defaultOpen' | 'searchTerm' | 'multiple' | 'disabled' | 'name' | 'resetSearchTermOnBlur'>, UseComponentIconsProps { +export interface SelectMenuProps extends Pick, 'modelValue' | 'defaultValue' | 'selectedValue' | 'open' | 'defaultOpen' | 'searchTerm' | 'multiple' | 'disabled' | 'name' | 'resetSearchTermOnBlur'>, UseComponentIconsProps { id?: string /** The placeholder text when the select is empty. */ placeholder?: string @@ -115,7 +115,7 @@ const slots = defineSlots>() const searchTerm = defineModel('searchTerm', { default: '' }) const appConfig = useAppConfig() -const rootProps = useForwardPropsEmits(reactivePick(props, 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur'), emits) +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 { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, id, name, highlight, disabled } = useFormField(props) const { orientation, size: buttonGroupSize } = useButtonGroup(props)