@stackframe/stack-ui 2.6.17 → 2.6.19

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,21 @@
1
1
  # @stackframe/stack-ui
2
2
 
3
+ ## 2.6.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Bugfixes
8
+ - Updated dependencies
9
+ - @stackframe/stack-shared@2.6.19
10
+
11
+ ## 2.6.18
12
+
13
+ ### Patch Changes
14
+
15
+ - fixed user update bug
16
+ - Updated dependencies
17
+ - @stackframe/stack-shared@2.6.18
18
+
3
19
  ## 2.6.17
4
20
 
5
21
  ### Patch Changes
@@ -10,8 +10,10 @@ type DataTableProps<TData, TValue> = {
10
10
  data: TData[];
11
11
  toolbarRender?: (table: TableType<TData>) => React.ReactNode;
12
12
  defaultVisibility?: VisibilityState;
13
+ defaultFilters?: ColumnFiltersState;
14
+ defaultSorting?: SortingState;
13
15
  };
14
- export declare function DataTable<TData, TValue>({ columns, data, toolbarRender, defaultVisibility, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
16
+ export declare function DataTable<TData, TValue>({ columns, data, toolbarRender, defaultVisibility, defaultFilters, defaultSorting, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
15
17
  type DataTableServerProps<TData, TValue> = DataTableProps<TData, TValue> & {
16
18
  sorting?: SortingState;
17
19
  setSorting?: OnChangeFn<SortingState>;
@@ -12,9 +12,9 @@ export function TableView(props) {
12
12
  : flexRender(header.column.columnDef.header, header.getContext()) }, header.id));
13
13
  }) }, headerGroup.id))) }), _jsx(TableBody, { children: props.table.getRowModel().rows.length ? (props.table.getRowModel().rows.map((row) => (_jsx(TableRow, { "data-state": row.getIsSelected() && "selected", children: row.getVisibleCells().map((cell) => (_jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) : (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: props.columns.length, className: "h-24 text-center", children: "No results." }) })) })] }) }), _jsx(DataTablePagination, { table: props.table })] }));
14
14
  }
15
- export function DataTable({ columns, data, toolbarRender, defaultVisibility, }) {
16
- const [sorting, setSorting] = React.useState([]);
17
- const [columnFilters, setColumnFilters] = React.useState([]);
15
+ export function DataTable({ columns, data, toolbarRender, defaultVisibility, defaultFilters, defaultSorting, }) {
16
+ const [sorting, setSorting] = React.useState(defaultSorting || []);
17
+ const [columnFilters, setColumnFilters] = React.useState(defaultFilters || []);
18
18
  const [pagination, setPagination] = React.useState({
19
19
  pageIndex: 0,
20
20
  pageSize: 10,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack-ui",
3
- "version": "2.6.17",
3
+ "version": "2.6.19",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -68,7 +68,7 @@
68
68
  "react-hook-form": "^7.51.4",
69
69
  "react-resizable-panels": "^2.0.19",
70
70
  "tailwind-merge": "^2.3.0",
71
- "@stackframe/stack-shared": "2.6.17"
71
+ "@stackframe/stack-shared": "2.6.19"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/react": "^18.2.66",