Currently, I am utilizing Angular ngselect to showcase a dropdown menu with multiple options. However, due to the limited screen space, I need to restrict the number of items visible in the dropdown to about 3, allowing users to scroll through the rest.
Within a reactive form, I have integrated ng-select, and it appears as shown below:
Upon selecting the payment method, everything looks fine since there are only 2 items displayed.
However, upon choosing another option from the dropdown list, it gets cut off because the size exceeds the container's boundaries.
To address this issue, I attempted an alternative approach by appending the ng select dropdown to the body using appendTo="body"
.
When the dropdown appears using this method, it maintains its position rather than moving along with the ngselect element when I scroll through the page—resulting in some usability challenges.
My main concern is how to limit the number of elements displayed within the dropdown so that it fits snugly inside the container without any overflow issues.