Skip to content

Empty state message displays inside scrollbar with custom SelectPanel height #6220

@francinelucca

Description

@francinelucca

When using a custom height in SelectPanel (e.g., height: medium), the empty state message is improperly rendered within a scrollbar, even when there is ample space to display the message without a scrollbar. This can be observed in the storybook example for height variations and scroll (https://primer.style/react/storybook/?path=/story/components-selectpanel-examples--height-variations-and-scroll&globals=featureFlags.primer_react_css_modules_ga:!true;featureFlags.primer_react_select_panel_with_modern_action_list:!true). If you type a term such as "dddd" into the search bar, the empty state appears inside a scrollable area, which is not expected.

See attached screenshot for reference:

image1

Expected behavior:

  • The empty state message should display without being constrained by an unnecessary scrollbar when there is enough space in the panel.

Steps to reproduce:

  1. Open the storybook example for SelectPanel height variations and scroll.
  2. Set the height to medium.
  3. Type a string like "dddd" in the searchbar to trigger the empty state message.
  4. Note that the empty state message appears within a scrollable area, even if there's enough space for it to display fully.

Environment:

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions