Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: call onValueChange after filtering the list #70

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

Andarist
Copy link
Contributor

fixes #68

@vercel
Copy link

vercel bot commented Dec 13, 2022

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

Name Status Preview Updated
cmdk-website ✅ Ready (Inspect) Visit Preview Dec 13, 2022 at 1:52PM (UTC)

schedule(1, () => {
// Select the first item and emit again
selectFirstItem()
store.emit()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to emit again now because selectFirstItem calls into setState with the new value and that causes a new emit already

@pacocoursey pacocoursey merged commit 6ad8a86 into pacocoursey:main Dec 16, 2022
@Andarist Andarist deleted the fix/onvaluechange branch December 16, 2022 20:48
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.

Value from onValueChange not detecting filtered value
2 participants