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(context): read disablePointerSelection from propsRef #314

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

f0rr0
Copy link
Contributor

@f0rr0 f0rr0 commented Oct 18, 2024

Issue:
At present, updating the value disablePointerSelection prop after the component has rendered once does not propagate the updated value to the underlying code. context has outdated value of disablePointerSelection since the dependency array for useMemo is empty.

Proposed Fix:
Similar to other places in current codebase, use the propsRef which carries updated props instead of directly referencing disablePointerSelection prop.

Copy link

vercel bot commented Oct 18, 2024

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

Name Status Preview Comments Updated (UTC)
cmdk-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 6:22pm

@f0rr0 f0rr0 changed the title read disablePointerSelection from propsRef in context fix(context): read disablePointerSelection from propsRef in context Oct 18, 2024
@f0rr0 f0rr0 changed the title fix(context): read disablePointerSelection from propsRef in context fix(context): read disablePointerSelection from propsRef Oct 18, 2024
@f0rr0
Copy link
Contributor Author

f0rr0 commented Oct 18, 2024

@pacocoursey would appreciate a few mins of your time on this. Many thanks

@pacocoursey pacocoursey merged commit 5d9d6e3 into pacocoursey:main Oct 30, 2024
3 checks passed
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.

2 participants