cmdk icon indicating copy to clipboard operation
cmdk copied to clipboard

[Bug] command groups not showing if remounted when item contains and img tag

Open FredrikMWold opened this issue 7 months ago • 0 comments

Description

I'm using the Radix UI Collapsible component together with Command. There's an issue when the CommandList is unmounted and remounted — specifically when a CommandItem contains an <img> tag.

Current Behavior

No results are displayed after reopening, unless the input is completely cleared and retyped.

Steps to Reproduce

  1. Enter a search query into the CommandInput that filters results.
  2. Collapse the Collapsible component.
  3. Expand it again.
  4. The filtered results do not reappear, even though the input still contains the search query.

Expected Behavior

When reopening the Collapsible, the filtered results should still be visible based on the current search input.

Additional Info

  • Reproducible using the Codesandbox linked below.

Reproduction

🔗 Codesandbox link here

Environment

  • Radix UI version: 1.1.11
  • React version: 19.1.0
  • cmdk: 1.1.1

FredrikMWold avatar Jun 04 '25 13:06 FredrikMWold