Skip to content

Commit

Permalink
Merge pull request #61 from buildo/fix-table
Browse files Browse the repository at this point in the history
Fix custom column type and missing exports
  • Loading branch information
gabro committed Mar 7, 2022
2 parents 0c967be + 3eb923f commit fb84990
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/Table/createTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
useEffect,
} from "react";
import {
column,
createButtonColumn,
createButtonLinkColumn,
createChipColumn,
Expand Down Expand Up @@ -459,7 +460,7 @@ export function createTableColumns<CustomChipColor extends string>(
const chipColumn = createChipColumn(Chip);
const linkColumn = createLinkColumn(Link);
return {
custom: textColumn,
custom: column,
text: textColumn,
textWithIcon: textWithIconColumn,
number: numberColumn,
Expand All @@ -472,3 +473,13 @@ export function createTableColumns<CustomChipColor extends string>(
icon: iconColumn,
};
}

export type {
CellProps as TableCellProps,
Column as TableColumn,
Row as TableRow,
} from "react-table";

export type { Column, Row } from "./types";

export type { ColumnOptionsBase } from "./tableColumn";
2 changes: 1 addition & 1 deletion src/Table/tableColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {

export type { CellProps } from "react-table";

type ColumnOptionsBase<A> = {
export type ColumnOptionsBase<A> = {
accessor: A;
headerLabel?: LocalizedString;
missingValue?: LocalizedString;
Expand Down

0 comments on commit fb84990

Please sign in to comment.