Skip to content

Commit

Permalink
Added searchAndResetPage function for the search bar to call
Browse files Browse the repository at this point in the history
  • Loading branch information
ansengarvin committed Apr 26, 2024
1 parent fcd3868 commit 01eeccb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/routes/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
proteinEntries = result.proteinEntries;
totalFound = result.totalFound;
}
async function searchAndResetPage() {
page = 0;
await search();
}
async function resetFilter() {
speciesFilter = undefined;
lengthFilter = lengthExtent;
Expand Down Expand Up @@ -133,7 +137,7 @@
</div>

<div id="view">
<form id="search-bar" on:submit|preventDefault={search}>
<form id="search-bar" on:submit|preventDefault={searchAndResetPage}>
<Search
size="lg"
type="text"
Expand Down

0 comments on commit 01eeccb

Please sign in to comment.