Skip to content

Commit fb7db94

Browse files
authored
Merge pull request #171 from samply/fix-query-initial-load
Fix query initial load
2 parents 7a8d564 + a58ba35 commit fb7db94

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bbmri-sample-locator",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"private": true,
55
"scripts": {
66
"dev": "vite dev",

src/App.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@
9292
// Set the catalogue
9393
setCatalogue(catalogue as Catalogue);
9494
95-
// Wait for the search bar component to load the query from the URL, then send the query
96-
await customElements.whenDefined("lens-search-bar-multiple");
97-
sendQuery();
95+
// Wait for the search bar to initialize (load query from URL) before sending the initial query.
96+
// Using setTimeout to ensure the custom element's onMount has completed.
97+
setTimeout(() => sendQuery(), 0);
9898
});
9999
</script>
100100

0 commit comments

Comments
 (0)