Skip to content

feat: expose the closeMenuOnSelect option in dropdown component #3202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ Dropdown.propTypes = {
*/
disabled: PropTypes.bool,

/**
* If false, the menu of the dropdown will not close once a value is selected.
*/
closeMenuOnSelect: PropTypes.bool,

/**
* height of each option. Can be increased when label lengths would wrap around
*/
Expand Down Expand Up @@ -214,6 +219,7 @@ Dropdown.defaultProps = {
searchable: true,
optionHeight: 35,
maxHeight: 200,
closeMenuOnSelect: true,
persisted_props: ['value'],
persistence_type: 'local',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const RDProps = [
'maxHeight',
'style',
'className',
'closeMenuOnSelect',
];

const Dropdown = props => {
Expand Down