Skip to content

Commit

Permalink
Merge pull request #4299 from GordonSmith/DGRID2_ERRORS
Browse files Browse the repository at this point in the history
fix: dgrid2 producing tsc errors
  • Loading branch information
GordonSmith authored Nov 14, 2024
2 parents 85717cc + f834768 commit 0c1057b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/dgrid2/src/reactTable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import React from "react";
import DataGrid, { Column, SelectColumn, SortColumn } from "react-data-grid";
import { format, timeFormat, timeParse } from "@hpcc-js/common";
import { useData } from "./hooks.ts";
Expand Down Expand Up @@ -61,7 +61,7 @@ export const ReactTable: React.FunctionComponent<ReactTableProps> = ({
// Columns ---
React.useEffect(() => {
setListColumns([
...multiSelect ? [SelectColumn] : [],
...multiSelect ? [SelectColumn as ColumnEx<any[]>] : [],
...columns.map((column): ColumnEx<any[]> => {
const type = columnTypes[column] ?? "string";
let formatter;
Expand Down Expand Up @@ -145,13 +145,13 @@ export const ReactTable: React.FunctionComponent<ReactTableProps> = ({
rows={rows}
rowKeyGetter={rowKeyGetter}
rowHeight={20}
emptyRowsRenderer={() => <EmptyRowsRenderer message={table.noDataMessage()} />}
renderers={{ noRowsFallback: <EmptyRowsRenderer message={table.noDataMessage()} /> }}
className={table.darkMode() ? "rdg-dark" : "rdg-light"}
sortColumns={sortColumn ? [sortColumn] : []}
onSortColumnsChange={onSortColumnsChange}
selectedRows={selectedRows}
onSelectedRowsChange={multiSelect ? onSelectedRowsChange : undefined}
onRowClick={multiSelect ? undefined : (rowIdx, row, column) => onCellClick(row, column)}
onCellClick={multiSelect ? undefined : (args, event) => onCellClick(args.row, args.column)}
aria-describedby={""}
aria-label={""}
aria-labelledby={""}
Expand Down

0 comments on commit 0c1057b

Please sign in to comment.