Skip to content

Commit

Permalink
Fix TableCell definition (#1386)
Browse files Browse the repository at this point in the history
As per source (https://github.com/react-toolbox/react-toolbox/blob/dev/components/table/TableCell.js#L7) `sorted` accepts lower-case strings but the TypeScript definition uses upper-case. So there is either error from TS (`TS2322:Type 'string' is not assignable to type '"ASC" | "DESC"'`) or React (`Warning: Failed prop type: Invalid prop `sorted` of value `ASC` supplied to `ThemedTableCell`, expected one of ["asc","desc"].`).
  • Loading branch information
priecint authored and javivelasco committed Apr 6, 2017
1 parent 4cc87db commit 991a430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/table/TableCell.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface TableCellProps extends ReactToolbox.Props {
/**
* If you provide a value the cell will show an arrow pointing down or up depending on the value to indicate it is a sorted element. Useful only for columns.
*/
sorted?: 'ASC' | 'DESC';
sorted?: 'asc' | 'desc';
/**
* The element tag, either `td` or `th`.
* @default 'td'
Expand Down

0 comments on commit 991a430

Please sign in to comment.