huntabyte / cmdk-sv

cmdk, but for Svelte ✨
https://cmdk-sv.com
MIT License
410 stars 17 forks source link

fix: select first value after search #83

Closed deronek closed 22 hours ago

deronek commented 4 days ago

17 and 8f8fa9f added code so that first value is selected after search is executed (fixed #16). However, though internal state was updated, it was not propagated to onValueChange and exposed value.

You can easily notice it in the Framer example from the website:

  1. Search for any component in the input.
  2. Notice that the selected component on the right side does not change.

This PR fixes this, though since the state management in this library is pretty complex, please double check that it won't break anything.

changeset-bot[bot] commented 4 days ago

🦋 Changeset detected

Latest commit: d2137f9982ccdbbfe71aea90deb03d77c326ff68

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------- | ----- | | cmdk-sv | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 4 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmdk-sv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 4:21pm