wire-elements / spotlight

Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.
MIT License
912 stars 71 forks source link

Missing documentation: Fuse.js #89

Open damms005 opened 2 years ago

damms005 commented 2 years ago

In README.md under How to define search synonyms, I believe it should be explicitly made clear the effect of the filteredItems() function using Fuse JS, to the end that the result returned from the Spotlight command on the backend may not be shown/displayed on the frontend because it is filtered out from what is displayed to the user, differently from what is returned by the backend.

I lost quality time trying to debug why I returned items as SpotlightSearchResult but nothing showed up on the frontend. I had to dive into the code to figure that out, and I believe such crucial behaviour should be documented.

Please let me know if a PR that updates the doc to this effect is welcomed.

undjike commented 1 year ago

I faced the same issue. I thought of disabling front filtering when the search engine is not command.