diff --git a/packages/bento-design-system/src/SelectField/BaseSelect.tsx b/packages/bento-design-system/src/SelectField/BaseSelect.tsx index 2c6b4f364..4755fce1d 100644 --- a/packages/bento-design-system/src/SelectField/BaseSelect.tsx +++ b/packages/bento-design-system/src/SelectField/BaseSelect.tsx @@ -107,7 +107,7 @@ export function BaseSelect(props: Props) { placeholder={placeholder} menuPortalTarget={menuPortalTarget.current} components={selectComponents} - openMenuOnFocus + openMenuOnFocus={props.openMenuOnFocus ?? dropdownConfig.openMenuOnFocus} styles={selectComponents.styles>()} validationState={validationState} isMulti={isMulti} diff --git a/packages/bento-design-system/src/SelectField/Config.ts b/packages/bento-design-system/src/SelectField/Config.ts index b28c85277..7e64edb31 100644 --- a/packages/bento-design-system/src/SelectField/Config.ts +++ b/packages/bento-design-system/src/SelectField/Config.ts @@ -16,4 +16,5 @@ export type DropdownConfig = { openIndicatorIconSize: IconProps["size"]; chipColor: ChipProps["color"]; chipSpacing: BentoSprinkles["gap"]; + openMenuOnFocus: boolean; }; diff --git a/packages/bento-design-system/src/SelectField/types.ts b/packages/bento-design-system/src/SelectField/types.ts index d6b416d1a..3ba619145 100644 --- a/packages/bento-design-system/src/SelectField/types.ts +++ b/packages/bento-design-system/src/SelectField/types.ts @@ -38,4 +38,5 @@ export type BaseSelectProps = { noOptionsMessage?: LocalizedString; isReadOnly?: boolean; searchable?: boolean; + openMenuOnFocus?: boolean; }; diff --git a/packages/bento-design-system/src/util/defaultConfigs.tsx b/packages/bento-design-system/src/util/defaultConfigs.tsx index 603ecdd26..9a121cc43 100644 --- a/packages/bento-design-system/src/util/defaultConfigs.tsx +++ b/packages/bento-design-system/src/util/defaultConfigs.tsx @@ -499,6 +499,7 @@ export const dropdown: DropdownConfig = { openIndicatorIconSize: 24, chipColor: "indigo", chipSpacing: 4, + openMenuOnFocus: true, }; export const table: TableConfig = {