Skip to content

Conversation

@craigmhughes
Copy link

Summary

This PR fixes an issue where editing the search query in the MultiSelect component could cause valid options to disappear until the search input was completely cleared.

When both cmdk’s internal filtering and the component’s manual .filter() logic ran simultaneously, the internal filter could cache a “no results” state and fail to update when the user backspaced or edited their input.

Root Cause

  • The <Command> component from cmdk performs built-in filtering by default.
  • The MultiSelect component also applies its own manual filtering based on searchValue.
  • This double-filtering caused the internal state to become stale and desynced from the visible options

Screen recordings

Bug encountered

multi-select-bug.mov

Post-Fix

multi-select-fix.mov

@vercel
Copy link

vercel bot commented Oct 30, 2025

Someone is attempting to deploy a commit to the sersavan's projects Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant