Skip to content

feat(select): add menuMinWidth and menuMaxWidth to SimpleSingleSelect - #1759

Merged
arina-gutuboe merged 3 commits into
masterfrom
LIBS-869/simple-single-select-dropdown-width-flexibility
Sep 22, 2026
Merged

arina-gutuboe merged 3 commits into
masterfrom
LIBS-869/simple-single-select-dropdown-width-flexibility

Conversation

@arina-gutuboe

@arina-gutuboe arina-gutuboe commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Implements LIBS-869


Description

#1744 added menuMinWidth/menuMaxWidth to SingleSelect and MultiSelect for flexible, fit-content menu sizing.

This PR adds the same props to SimpleSingleSelect and SimpleSingleSelectField for consistent behavior across all select variants.


Known issues

With only menuMinWidth (no menuMaxWidth), the menu can grow without an upper bound for very long option labels; menuMinWidth and menuMaxWidth should be used together when labels can vary significantly in length.


Checklist

  • API docs are generated
  • Tests were added
  • Storybook demos were added

Screenshots

menuMaxWidth is slightly greater than the width of the input, but less than the width of the options:
Screenshot 2026-07-29 at 12 50 40

with menuMinWidth:
Screenshot 2026-07-29 at 12 51 06

@sonarqubecloud

Copy link
Copy Markdown

@dhis2-bot

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-1759--dhis2-ui.netlify.app

@dhis2-bot
dhis2-bot temporarily deployed to netlify July 29, 2026 11:06 Inactive
@arina-gutuboe
arina-gutuboe marked this pull request as ready for review July 29, 2026 11:18
@arina-gutuboe
arina-gutuboe requested a review from a team as a code owner July 29, 2026 11:18

@d-rita d-rita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Tested both versions on various screen sizes and works as expected. Wraps the content for smaller screens.

@sonarqubecloud

Copy link
Copy Markdown

@dhis2-bot
dhis2-bot temporarily deployed to netlify September 18, 2026 09:39 Inactive
@arina-gutuboe
arina-gutuboe merged commit 41ba62e into master Sep 22, 2026
19 checks passed
@arina-gutuboe
arina-gutuboe deleted the LIBS-869/simple-single-select-dropdown-width-flexibility branch September 22, 2026 08:34
@dhis2-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 10.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was previously deployed

1 inactive deployment
netlify — 0bceb66e Deployed Sep 18, 2026 by dhis2-bot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants