run npm run format
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
|
||||
import { LOCATIONS } from '$lib/locations-object.svelte.ts';
|
||||
|
||||
|
||||
|
||||
let { value = $bindable() } = $props();
|
||||
|
||||
let showResults = $state(false);
|
||||
@@ -15,7 +13,6 @@
|
||||
|
||||
const MAX_RESULTS = 5;
|
||||
|
||||
|
||||
function tokenize(query: string) {
|
||||
return query.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
||||
}
|
||||
@@ -41,12 +38,11 @@
|
||||
return a.n.localeCompare(b.n);
|
||||
})
|
||||
.slice(0, MAX_RESULTS);
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
if (results) selectedIndex = -1;
|
||||
});
|
||||
if (results) selectedIndex = -1;
|
||||
});
|
||||
|
||||
// Hide results when click outside of container
|
||||
$effect(() => {
|
||||
@@ -68,7 +64,7 @@
|
||||
selectedIndex = -1;
|
||||
value = '';
|
||||
console.log('Selected Location: ', JSON.stringify(loc));
|
||||
const queryString = loc.c || loc.t
|
||||
const queryString = loc.c || loc.t;
|
||||
goto(`/board?loc=${queryString.toLowerCase()}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user