aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/App.vue16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/App.vue b/src/App.vue
index 43ba322..4120fe5 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -49,10 +49,10 @@
49 <SearchInput 49 <SearchInput
50 class="navbar-item is-inline-block-mobile" 50 class="navbar-item is-inline-block-mobile"
51 :hotkey="searchHotkey()" 51 :hotkey="searchHotkey()"
52 @input="filterServices" 52 @input="filterServices($event.target?.value)"
53 @search-focus="showMenu = true" 53 @search-focus="showMenu = true"
54 @search-open="navigateToFirstService" 54 @search-open="navigateToFirstService($event?.target?.value)"
55 @search-cancel="filterServices" 55 @search-cancel="filterServices()"
56 /> 56 />
57 </Navbar> 57 </Navbar>
58 </div> 58 </div>
@@ -255,11 +255,12 @@ export default {
255 }); 255 });
256 }, 256 },
257 matchesFilter: function (item) { 257 matchesFilter: function (item) {
258 const needle = this.filter?.toLowerCase();
258 return ( 259 return (
259 item.name.toLowerCase().includes(this.filter) || 260 item.name.toLowerCase().includes(needle) ||
260 (item.subtitle && item.subtitle.toLowerCase().includes(this.filter)) || 261 (item.subtitle && item.subtitle.toLowerCase().includes(needle)) ||
261 (item.tag && item.tag.toLowerCase().includes(this.filter)) || 262 (item.tag && item.tag.toLowerCase().includes(needle)) ||
262 (item.keywords && item.keywords.toLowerCase().includes(this.filter)) 263 (item.keywords && item.keywords.toLowerCase().includes(needle))
263 ); 264 );
264 }, 265 },
265 navigateToFirstService: function (target) { 266 navigateToFirstService: function (target) {
@@ -271,6 +272,7 @@ export default {
271 } 272 }
272 }, 273 },
273 filterServices: function (filter) { 274 filterServices: function (filter) {
275 console.log(filter);
274 this.filter = filter; 276 this.filter = filter;
275 277
276 if (!filter) { 278 if (!filter) {