Skip to content

Commit

Permalink
Merge pull request #862 from manojVivek/type-error-fix
Browse files Browse the repository at this point in the history
React-table type error fix
  • Loading branch information
metalmatze committed Aug 17, 2023
2 parents 859f49f + 5f68d67 commit a1779e3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ui/src/pages/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
getCoreRowModel,
getSortedRowModel,
Row as TableRow,
RowData as TableRowData,
SortingFnOption,
SortingState,
useReactTable,
Expand Down Expand Up @@ -242,9 +241,9 @@ interface row {
}

const columnHelper = createColumnHelper<row>()
const sortingNumberNull: SortingFnOption<TableRowData> = (
rowA: TableRow<TableRowData>,
rowB: TableRow<TableRowData>,
const sortingNumberNull: SortingFnOption<row> = (
rowA: TableRow<row>,
rowB: TableRow<row>,
columnId: string,
): number => {
const av: number | null = rowA.getValue(columnId)
Expand Down Expand Up @@ -323,7 +322,7 @@ const columns = [
header: 'Availability',
cell: (props) => {
const v = props.getValue()
const target = props.row.getValue('objective') ?? 0
const target = props.row.getValue<number>('objective') ?? 0
if (v === undefined) {
return 'No data'
}
Expand Down

0 comments on commit a1779e3

Please sign in to comment.