Closed elsonlim closed 2 weeks ago
Hi @elsonlim, this enhancements seats closer with the style repository behind @govtechsg/sgds-react I will transfer this issue to that repository.
@elsonlim do note that the customisation of height can be made possible, but it has to be done through SASS as this repo is written in SASS. We will give a default of 480px max-height when the combobox menu is scrollable
Thanks, @clukhei. That will be very helpful!
@elsonlim please update @govtechsg/sgds
to version v2.3.4 and @govtechsg/sgds-react
to v2.7.0 to get these changes.
Prerequisites
Proposal
Propose adding support for vertical (Y-axis) scrolling within the dropdown menu of combo boxes. This enhancement would allow users to easily navigate through long lists of items, especially when the dropdown menu exceeds the available screen space.
Scrolling flag: Introduce a new property or configuration setting (e.g., enableScrolling or scrollable) that allows developers to explicitly enable or disable Y-axis scrolling for the combo box dropdown menu. The default behaviour could be disabled to avoid breaking change.
Customisation options: Developers should have the ability to customise the maximum height of the dropdown menu, the appearance of the scrollbar, and other relevant styling options.
Motivation and context
Long dropdown menus in combo boxes can pose usability challenges, particularly when they extend beyond the visible screen area. Users may have to resize the window or scroll the entire page to view all the options, which can be frustrating and inefficient.