From e8fb5078f4571cbc52dfa1df052af2e9c49f832b Mon Sep 17 00:00:00 2001 From: ansengarvin <45224464+ansengarvin@users.noreply.github.com> Date: Thu, 25 Apr 2024 19:25:05 -0700 Subject: [PATCH] Fix: Accounted for edge case scenario where next page would return 0 proteins: Changed message from 'no proteins found' to 'no more proteins found' in this case. --- frontend/src/routes/Search.svelte | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend/src/routes/Search.svelte b/frontend/src/routes/Search.svelte index a7b884a..0efda41 100644 --- a/frontend/src/routes/Search.svelte +++ b/frontend/src/routes/Search.svelte @@ -86,8 +86,7 @@ outline on:click={async () => { speciesFilter = s; - page = 0; - await search(); + await searchAndResetPage(); }} > {s} @@ -104,8 +103,7 @@ max={lengthExtent.max} on:change={async ({ detail }) => { lengthFilter = detail; - page = 0; - await search(); + await searchAndResetPage(); }} /> {/if} @@ -119,8 +117,7 @@ max={massExtent.max} on:change={async ({ detail }) => { massFilter = detail; - page = 0; - await search(); + await searchAndResetPage() }} /> {/if} @@ -170,7 +167,12 @@ textRight /> {:else if proteinEntries.length === 0} - No proteins found + { #if page > 0 } + No more proteins found + {:else} + No proteins found + {/if} + {:else} {/if}