In setPositioning, where maxHeight of the listbox was already being calculated, now limit to maximum of 10.5 visible items. For a filterable select, the height of the filter adds to the height of the listbox, i.e. we still show 10.5 options. If a select contains grouped options, extra space is not reserved for group headers, meaning fewer than 10.5 options may be visible. This results in a simpler implementation and prevents height changes/jiggle when typing in the filter box and more than 10 options are matched.
๐งช Testing
Added visual tests for the height limiting behavior, including with/without filter input and above/below.
โ Checklist
[x] I have updated the project documentation to reflect my changes or determined no changes are needed.
Pull Request
๐คจ Rationale
Fixes #1870
๐ฉโ๐ป Implementation
In
setPositioning
, wheremaxHeight
of the listbox was already being calculated, now limit to maximum of 10.5 visible items. For a filterable select, the height of the filter adds to the height of the listbox, i.e. we still show 10.5 options. If a select contains grouped options, extra space is not reserved for group headers, meaning fewer than 10.5 options may be visible. This results in a simpler implementation and prevents height changes/jiggle when typing in the filter box and more than 10 options are matched.๐งช Testing
Added visual tests for the height limiting behavior, including with/without filter input and above/below.
โ Checklist