Skip to content

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.

@vercel
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 dip:main Oct 30, 2024
@f0rr0 f0rr0 deleted the fix/disable-pointer-selection branch November 1, 2024 10:49
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