@dust-tt/sparkle 0.2.217 → 0.2.218

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dust-tt/sparkle",
3
- "version": "0.2.217",
3
+ "version": "0.2.218",
4
4
  "scripts": {
5
5
  "build": "rm -rf dist && rollup -c",
6
6
  "build:with-tw-base": "rollup -c --environment INCLUDE_TW_BASE:true",
@@ -4,7 +4,7 @@ import {
4
4
  flexRender,
5
5
  getCoreRowModel,
6
6
  getFilteredRowModel,
7
- getSortedRowModel,
7
+ getSortedRowModel, SortingFn,
8
8
  type SortingState,
9
9
  useReactTable,
10
10
  } from "@tanstack/react-table";
@@ -35,6 +35,7 @@ interface DataTableProps<TData extends TBaseData> {
35
35
  filterColumn?: string;
36
36
  initialColumnOrder?: SortingState;
37
37
  columnsBreakpoints?: ColumnBreakpoint;
38
+ sortingFn?: SortingFn<TData>
38
39
  }
39
40
 
40
41
  function shouldRenderColumn(
@@ -54,6 +54,20 @@ export const DataTableExample = () => {
54
54
  },
55
55
  ],
56
56
  },
57
+ {
58
+ name: "design",
59
+ usedBy: 3,
60
+ addedBy: "User21",
61
+ lastUpdated: "2023-07-09",
62
+ size: "64kb",
63
+ icon: FolderIcon,
64
+ moreMenuItems: [
65
+ {
66
+ label: "Edit",
67
+ onClick: () => console.log("Edit"),
68
+ },
69
+ ],
70
+ },
57
71
  {
58
72
  name: "Development",
59
73
  usedBy: 5,
@@ -81,6 +95,7 @@ export const DataTableExample = () => {
81
95
  {
82
96
  accessorKey: "name",
83
97
  header: "Name",
98
+ sortingFn: "text",
84
99
  cell: (info) => (
85
100
  <DataTable.CellContent
86
101
  avatarUrl={info.row.original.avatarUrl}