Skip to content

Commit

Permalink
Fix accidentally breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfisher72 committed Oct 22, 2024
1 parent d40af7a commit 68d3559
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weng-lab/psychscreen-ui-components",
"description": "Typescript and Material UI based components used for psychSCREEN",
"author": "SCREEN Team @ UMass Chan Medical School",
"version": "2.0.6",
"version": "2.0.7",
"license": "MIT",
"type": "module",
"typings": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataTable/datatable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ const DataTable = <T,>(
}
>
{column.FunctionalRender ? (
<column.FunctionalRender row={row} />
column.FunctionalRender(row)
) : column.render ? (
column.render(row)
) : (
Expand Down
12 changes: 8 additions & 4 deletions src/components/DataTable/types.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import React from "react"

export type DataTableColumn<T> = {
tooltip?: string
header: string
HeaderRender?: React.FC
/**
* Custom render function for the column header
*/
HeaderRender?: () => JSX.Element;
value: (row: T) => string | number
search?: (row: T) => boolean
unsearchable?: boolean
render?: (row: T) => string | JSX.Element
FunctionalRender?: (props: { row: T }) => JSX.Element;
/**
* Custom render function for the row
*/
FunctionalRender?: (row: T) => JSX.Element;
sort?: (a: T, b: T) => number
unsortable?: boolean
}
Expand Down

0 comments on commit 68d3559

Please sign in to comment.