Skip to content

Commit

Permalink
Reset pagination if filter text ever changes (#691)
Browse files Browse the repository at this point in the history
Weird things can happen if you were on a subsequent page and changed
the filter text (up to and including being past the "edge" of where
one is allowed to paginate)
  • Loading branch information
wlach authored Jun 21, 2021
1 parent 714d71f commit 6d07be4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/FilterInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
type="search"
id="filter-input"
bind:value={$pageState.search}
on:input={() => {
// we want to reset the page number to 1 if the filter text ever changes
$pageState.page = 1;
}}
/>
</div>

Expand Down

0 comments on commit 6d07be4

Please sign in to comment.