Skip to content

Commit

Permalink
Fix: Accounted for edge case scenario where next page would return 0 …
Browse files Browse the repository at this point in the history
…proteins: Changed message from 'no proteins found' to 'no more proteins found' in this case.
  • Loading branch information
ansengarvin committed Apr 26, 2024
1 parent 01eeccb commit e8fb507
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions frontend/src/routes/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@
outline
on:click={async () => {
speciesFilter = s;
page = 0;
await search();
await searchAndResetPage();
}}
>
{s}
Expand All @@ -104,8 +103,7 @@
max={lengthExtent.max}
on:change={async ({ detail }) => {
lengthFilter = detail;
page = 0;
await search();
await searchAndResetPage();
}}
/>
{/if}
Expand All @@ -119,8 +117,7 @@
max={massExtent.max}
on:change={async ({ detail }) => {
massFilter = detail;
page = 0;
await search();
await searchAndResetPage()
}}
/>
{/if}
Expand Down Expand Up @@ -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}
<ListProteins allEntries={proteinEntries} />
{/if}
Expand Down

0 comments on commit e8fb507

Please sign in to comment.