Skip to content

Commit

Permalink
[sparkle] fix: Fix table column types (#6895)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier authored Aug 23, 2024
1 parent 6b6f630 commit 7c5eca0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sparkle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dust-tt/sparkle",
"version": "0.2.209",
"version": "0.2.210",
"scripts": {
"build": "rm -rf dist && rollup -c",
"build:with-tw-base": "rollup -c --environment INCLUDE_TW_BASE:true",
Expand Down
8 changes: 4 additions & 4 deletions sparkle/src/components/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ interface ColumnBreakpoint {
[columnId: string]: "xs" | "sm" | "md" | "lg" | "xl";
}

interface DataTableProps<TData extends TBaseData, TValue> {
interface DataTableProps<TData extends TBaseData> {
data: TData[];
columns: ColumnDef<TData, TValue>[];
columns: ColumnDef<TData, string & number>[];
className?: string;
filter?: string;
filterColumn?: string;
Expand All @@ -47,15 +47,15 @@ function shouldRenderColumn(
return windowWidth >= breakpoints[breakpoint];
}

export function DataTable<TData extends TBaseData, TValue>({
export function DataTable<TData extends TBaseData>({
data,
columns,
className,
filter,
filterColumn,
initialColumnOrder,
columnsBreakpoints = {},
}: DataTableProps<TData, TValue>) {
}: DataTableProps<TData>) {
const windowSize = useWindowSize();
const [sorting, setSorting] = useState<SortingState>(
initialColumnOrder ?? []
Expand Down

0 comments on commit 7c5eca0

Please sign in to comment.