Skip to content

Commit e5b1ed1

Browse files
committed
fix: totalPages should react to changes in base rows
1 parent 99342b6 commit e5b1ed1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/ninety-pets-eat.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@careswitch/svelte-data-table': patch
3+
---
4+
5+
fix: `totalPages` should react to changes in base rows

src/lib/DataTable.svelte.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ export class DataTable<T> {
223223
* @returns {number} The total number of pages.
224224
*/
225225
get totalPages() {
226-
// React to changes in filter state
226+
// React to changes in original data and filter state
227+
this.#originalData;
227228
this.#filterState;
228229
this.#globalFilter;
229230

0 commit comments

Comments
 (0)