spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Feat]: Add CSS custom property to set the `max-height` of the `sp-picker` popover

Open Rocss opened this issue 1 year ago • 1 comments

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Impacted component(s)

sp-picker

Description of the requested feature

Right now two of our feature teams expressed a need to somehow limit the height of the dropdown popover in sp-picker. In use cases where there are a lot of options available, the dropdown spawns the entire screen, covering other UI elements which we do not want to be covered.

Looking at sp-combobox, seems like this is already possible there by using --sp-combobox-popover-max-block-size.

Mockups or screenshots

No response

Implementation notes or ideas

Add

sp-popover {
    max-block-size: var(--sp-picker-popover-max-block-size);
}

inside picker.css file.

Rocss avatar Jun 14 '24 08:06 Rocss

As per Spectrum docs: https://spectrum.adobe.com/page/picker/#Menu-height there is no maximum height specified.

Rocss avatar Jun 14 '24 10:06 Rocss

Closing this based on the outcome of #4566

caseyisonit avatar Jul 08 '25 22:07 caseyisonit