Skip to content

Commit

Permalink
fix: totalPages should react to changes in base rows
Browse files Browse the repository at this point in the history
  • Loading branch information
pheuter committed Jul 19, 2024
1 parent 99342b6 commit e5b1ed1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ninety-pets-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@careswitch/svelte-data-table': patch
---

fix: `totalPages` should react to changes in base rows
3 changes: 2 additions & 1 deletion src/lib/DataTable.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ export class DataTable<T> {
* @returns {number} The total number of pages.
*/
get totalPages() {
// React to changes in filter state
// React to changes in original data and filter state
this.#originalData;
this.#filterState;
this.#globalFilter;

Expand Down

0 comments on commit e5b1ed1

Please sign in to comment.