From 991a430ca22f905e12556def4bba27872e445514 Mon Sep 17 00:00:00 2001 From: priecint Date: Thu, 6 Apr 2017 09:52:54 +0200 Subject: [PATCH] Fix TableCell definition (#1386) 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"].`). --- components/table/TableCell.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/table/TableCell.d.ts b/components/table/TableCell.d.ts index 02f73458..208760cd 100644 --- a/components/table/TableCell.d.ts +++ b/components/table/TableCell.d.ts @@ -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'