@stackframe/stack-ui 2.8.7 → 2.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/components/data-table/data-table.js +10 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @stackframe/stack-ui
|
|
2
2
|
|
|
3
|
+
## 2.8.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @stackframe/stack-shared@2.8.10
|
|
9
|
+
|
|
10
|
+
## 2.8.9
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- @stackframe/stack-shared@2.8.9
|
|
15
|
+
|
|
16
|
+
## 2.8.8
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Various changes
|
|
21
|
+
- @stackframe/stack-shared@2.8.8
|
|
22
|
+
|
|
3
23
|
## 2.8.7
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { runAsynchronouslyWithAlert } from "@stackframe/stack-shared/dist/utils/promises";
|
|
3
4
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@stackframe/stack-ui";
|
|
4
5
|
import { GlobalFiltering, flexRender, getCoreRowModel, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable, } from "@tanstack/react-table";
|
|
5
6
|
import React from "react";
|
|
@@ -35,15 +36,16 @@ export function DataTableManualPagination({ columns, data, toolbarRender, defaul
|
|
|
35
36
|
const [globalFilter, setGlobalFilter] = React.useState();
|
|
36
37
|
const [refreshCounter, setRefreshCounter] = React.useState(0);
|
|
37
38
|
React.useEffect(() => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
runAsynchronouslyWithAlert(async () => {
|
|
40
|
+
const { nextCursor } = await onUpdate({
|
|
41
|
+
cursor: cursors[pagination.pageIndex],
|
|
42
|
+
limit: pagination.pageSize,
|
|
43
|
+
sorting,
|
|
44
|
+
columnFilters,
|
|
45
|
+
globalFilters: globalFilter,
|
|
46
|
+
});
|
|
45
47
|
setCursors(c => nextCursor ? { ...c, [pagination.pageIndex + 1]: nextCursor } : c);
|
|
46
|
-
})
|
|
48
|
+
});
|
|
47
49
|
}, [pagination, sorting, columnFilters, refreshCounter]);
|
|
48
50
|
// Reset to first page when filters change
|
|
49
51
|
React.useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack-ui",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.10",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"react-hook-form": "^7.53.1",
|
|
77
77
|
"react-resizable-panels": "^2.1.6",
|
|
78
78
|
"tailwind-merge": "^2.5.4",
|
|
79
|
-
"@stackframe/stack-shared": "2.8.
|
|
79
|
+
"@stackframe/stack-shared": "2.8.10"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@types/react": "^18.2.12",
|