|
1 | 1 | <search-suggestions v-slot="searchSuggestions" :force-results="false">
|
2 |
| - <ais-instant-search |
3 |
| - v-if="searchSuggestions.searchClient" |
4 |
| - :index-name="config.index.search_query" |
5 |
| - :search-client="searchSuggestions.searchClient" |
6 |
| - > |
7 |
| - <ais-configure |
8 |
| - :query="currentRefinement || ' '" |
9 |
| - :hits-per-page.camel="{{ Arr::get($fields, 'size', config('rapidez.frontend.autocomplete.size', 3)) }}" |
10 |
| - filters="display_in_terms:1" |
11 |
| - /> |
12 |
| - <ais-hits v-slot="{ items }"> |
13 |
| - <div v-if="items && items.length" v-bind:class="{ 'border-b': currentRefinement }" class="py-2.5"> |
14 |
| - <x-rapidez::autocomplete.title> |
15 |
| - @lang('Suggestions') |
16 |
| - </x-rapidez::autocomplete.title> |
17 |
| - <ul class="flex flex-col font-sans"> |
18 |
| - <li v-for="(item, count) in items" class="flex flex-1 items-center w-full"> |
19 |
| - <a |
20 |
| - v-bind:href="window.url(item.redirect || '{{ route('search', ['q' => 'searchPlaceholder']) }}'.replace('searchPlaceholder', encodeURIComponent(item.query_text)))" |
21 |
| - class="relative flex items-center group w-full px-5 py-2 text-sm gap-x-4" |
22 |
| - data-turbo="false" |
23 |
| - > |
24 |
| - <x-rapidez::highlight attribute="query_text" class="line-clamp-2"/> |
25 |
| - </a> |
26 |
| - </li> |
27 |
| - </ul> |
28 |
| - </div> |
29 |
| - </ais-hits> |
30 |
| - </ais-instant-search> |
| 2 | + <ais-state-results v-slot="{ query }"> |
| 3 | + <ais-instant-search |
| 4 | + v-if="searchSuggestions.searchClient" |
| 5 | + :index-name="config.index.search_query" |
| 6 | + :search-client="searchSuggestions.searchClient" |
| 7 | + > |
| 8 | + <ais-configure |
| 9 | + :query="query || ' '" |
| 10 | + :hits-per-page.camel="{{ Arr::get($fields, 'size', config('rapidez.frontend.autocomplete.size', 3)) }}" |
| 11 | + filters="display_in_terms:1" |
| 12 | + /> |
| 13 | + <ais-hits v-slot="{ items }"> |
| 14 | + <div v-if="items && items.length" v-bind:class="{ 'border-b': query }" class="py-2.5"> |
| 15 | + <x-rapidez::autocomplete.title> |
| 16 | + @lang('Suggestions') |
| 17 | + </x-rapidez::autocomplete.title> |
| 18 | + <ul class="flex flex-col font-sans"> |
| 19 | + <li v-for="(item, count) in items" class="flex flex-1 items-center w-full"> |
| 20 | + <a |
| 21 | + v-bind:href="window.url(item.redirect || '{{ route('search', ['q' => 'searchPlaceholder']) }}'.replace('searchPlaceholder', encodeURIComponent(item.query_text)))" |
| 22 | + class="relative flex items-center group w-full px-5 py-2 text-sm gap-x-4" |
| 23 | + data-turbo="false" |
| 24 | + > |
| 25 | + <x-rapidez::highlight attribute="query_text" class="line-clamp-2"/> |
| 26 | + </a> |
| 27 | + </li> |
| 28 | + </ul> |
| 29 | + </div> |
| 30 | + </ais-hits> |
| 31 | + </ais-instant-search> |
| 32 | + </ais-state-results> |
31 | 33 | </search-suggestions>
|
0 commit comments