timc1 / kbar

fast, portable, and extensible cmd+k interface for your site
https://kbar.vercel.app
MIT License
4.84k stars 185 forks source link

fix: allow matches on words far in the label #350

Closed dubzzz closed 10 months ago

dubzzz commented 10 months ago

The current settings passed to fuse.js, make it unable to match something appearing very far in the label. In other words, if the label is made of 10 words and the query of the user aim to select on the 10th word, you'll never get the item.

With this PR I suggest to relax this constraint by asking fuse.js to ignore the location when performing its searches.

It should fixes the issue #337.

vercel[bot] commented 10 months ago

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

Name Status Preview Comments Updated (UTC)
kbar ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2023 9:20am
dubzzz commented 10 months ago

@timc1 Do you think there is a change to have it merged?

dubzzz commented 10 months ago

Thank you so so much ❤️

timc1 commented 10 months ago

@dubzzz Thanks for the contribution! :)