prefix: true, // Allow partial matches
processTerm: (term, _fieldName) => term.length < 3 ? null : term.toLowerCase()
},
- },
- query: '', // The search query
+ }, query: '', // The search query
medialibrary: '', // Holds URL of the media library that is passed in from the component
async init() {
return [];
}
- // console.log(`search results: ${this.query}`);
- // console.table(this.miniSearch.search(this.query))
+ return this.miniSearch.search(this.query);
+ },
- return this.miniSearch.search(this.query)
+ get showResults() {
+ return false;
},
get resultCount() {
x-show="searchOpen"
x-transition:enter.opacity.duration.500ms.delay.1500ms
x-transition:leave.opacity.delay.50ms>
- <div x-show="query !== ''" class="font-secondary font-medium">
+ <div x-show="showResults" class="font-secondary font-medium">
<p x-text="resultCount" class="mt-15 opacity-50"></p>
<div class="h-full max-h-full overflow-y-auto">