diff --git a/packages/core/src/components/Dropdown/Dropdown.tsx b/packages/core/src/components/Dropdown/Dropdown.tsx index e10f7d6860..5bfa13fe10 100644 --- a/packages/core/src/components/Dropdown/Dropdown.tsx +++ b/packages/core/src/components/Dropdown/Dropdown.tsx @@ -117,7 +117,9 @@ const Dropdown: VibeComponent & { filterOption, menuPosition = Dropdown.menuPositions.ABSOLUTE, "data-testid": dataTestId, - withGroupDivider = false + withGroupDivider = false, + inputValue, + blurInputOnSelect }: DropdownComponentProps, ref: React.ForwardedRef ) => { @@ -458,6 +460,8 @@ const Dropdown: VibeComponent & { loadingMessage={loadingMessage} tabSelectsValue={tabSelectsValue} filterOption={filterOption} + inputValue={inputValue} + blurInputOnSelect={blurInputOnSelect} {...asyncAdditions} {...additions} /> diff --git a/packages/core/src/components/Dropdown/Dropdown.types.ts b/packages/core/src/components/Dropdown/Dropdown.types.ts index d418301029..ece5e3f02a 100644 --- a/packages/core/src/components/Dropdown/Dropdown.types.ts +++ b/packages/core/src/components/Dropdown/Dropdown.types.ts @@ -279,7 +279,14 @@ export interface DropdownComponentProps extends CustomMenuBaseProps, CustomOptio * createFilter function is available at Dropdown.createFilter */ filterOption?: (option: DropdownOption, inputValue: string) => boolean; - + /** + * The current value of the input field, used to control the current value of the input field programmatically + */ + inputValue?: string; + /** + * If true, the input field will lose focus when an option is selected + */ + blurInputOnSelect?: boolean; withReadOnlyStyle?: boolean; OptionRenderer?: React.ReactNode; menuIsOpen?: boolean;