Skip to content

CascaderEmpty stays hidden in inline mode #138

Description

@focus0802

Description

CascaderEmpty is rendered in the DOM but remains hidden when Cascader is used in inline mode.

Popup mode works because CascaderContent provides the named group/combobox-content ancestor and Base UI's data-empty state. Inline mode renders CascaderPanel without CascaderContent, so the group-data-empty/combobox-content:flex class on CascaderEmpty can never activate.

Reproduction

  1. Render an inline Cascader with CascaderPanel, CascaderInput, CascaderList, and CascaderEmpty.
  2. Enter a query that matches no items.
  3. Inspect the DOM. The cascader-empty element exists with data-state="empty", but remains hidden.

Expected behavior

The empty message should be visible when an inline Cascader has no rendered items, matching popup Cascader and ComboboxEmpty behavior.

Suggested fix

Have inline CascaderPanel publish the same named-group and empty-state contract as CascaderContent: add group/combobox-content in inline mode and set data-empty when renderedItems.length === 0. This keeps CascaderEmpty aligned with ComboboxEmpty without a forced visibility override or conditional unmount.

Screenshots

Before

Inline Cascader before the fix: no empty message is visible

After

Inline Cascader after the fix: the empty message is visible

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions