cmdk
cmdk copied to clipboard
[Bug] command groups not showing if remounted when item contains and img tag
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
- Enter a search query into the
CommandInputthat filters results. - Collapse the
Collapsiblecomponent. - Expand it again.
- 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
Environment
- Radix UI version: 1.1.11
- React version: 19.1.0
- cmdk: 1.1.1