Open Fl0rianFischer opened 2 months ago
We currently don't limit the height on porpuse, as the HTML element behaves the same. The package we use under the hood (https://floating-ui.com/) sees, how much space is available on the screen and resizes accordingly. If your application wants to force to a max-height
to improve UX for whatever reason, you can easily do that by setting the following:
sd-select::part(listbox){
max-height: 134px;
overflow-y: auto;
}
Here is a working example: https://codepen.io/mariohamann/pen/JjVgpxq
We will discuss this with design and maybe we'll provide an easier API for that in future. For that I'm rewriting your ticket, but from my perspective I don't expect this to be done soon. Meanwhile you should be safe using the part
above. :)
For the thing with the missing border, I just created a new issue: https://github.com/solid-design-system/solid/issues/1042
(edited by @mariohamann, original ticket at the bottom)
User Story
As a developer I want to easily override
max-height
forsl-select
and theautocomplete
pattern.Technical Information
We could add
--listbox-max-height
which is set on the:host
and then can be easily overridden.DoR
DoD
feature
branchOriginal ticket
## Current behavior The dropdown of the sd-select displays very weird behavior with many entries ## Expected behavior Dropdown should have max height and scrollable content if there are a lot of options ## Steps to reproduce See video https://github.com/solid-design-system/solid/assets/8488432/67ceb6a3-58af-42b2-9779-47b403c1062e