@stackframe/stack-ui 2.8.7 → 2.8.8

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @stackframe/stack-ui
2
2
 
3
+ ## 2.8.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Various changes
8
+ - @stackframe/stack-shared@2.8.8
9
+
3
10
  ## 2.8.7
4
11
 
5
12
  ### 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
- onUpdate({
39
- cursor: cursors[pagination.pageIndex],
40
- limit: pagination.pageSize,
41
- sorting,
42
- columnFilters,
43
- globalFilters: globalFilter,
44
- }).then(({ nextCursor }) => {
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
- }).catch(console.error);
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.7",
3
+ "version": "2.8.8",
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.7"
79
+ "@stackframe/stack-shared": "2.8.8"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@types/react": "^18.2.12",