pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
10k stars 288 forks source link

fix(context): read disablePointerSelection from propsRef #314

Closed f0rr0 closed 4 weeks ago

f0rr0 commented 1 month ago

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[bot] commented 1 month ago

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 commented 1 month ago

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