From 05b4c4f3646c3128545b95c8bf868863ab7b2aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Tabille=20Manjabosco?= Date: Wed, 31 Jan 2018 16:27:11 -0200 Subject: [PATCH] Add missing properties "defaultSortDirection" and "headerStyle" to ColumnProps --- types/react-virtualized/dist/es/Table.d.ts | 8 ++++++-- types/react-virtualized/react-virtualized-tests.tsx | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/types/react-virtualized/dist/es/Table.d.ts b/types/react-virtualized/dist/es/Table.d.ts index 97fe20b657..87f79de86d 100644 --- a/types/react-virtualized/dist/es/Table.d.ts +++ b/types/react-virtualized/dist/es/Table.d.ts @@ -74,6 +74,8 @@ export type ColumnProps = { columnData?: any; /** Uniquely identifies the row-data attribute correspnding to this cell */ dataKey: any; + /** Default sort order when clicked for the first time. Valid options include "ASC" and "DESC". Defaults to "ASC" */ + defaultSortDirection?: SortDirectionType; /** If sort is enabled for the table at large, disable it for this column */ disableSort?: boolean; /** Flex grow style; defaults to 0 */ @@ -87,6 +89,10 @@ export type ColumnProps = { * ({ columnData: object, dataKey: string, disableSort: boolean, label: string, sortBy: string, sortDirection: string }): PropTypes.node */ headerRenderer?: TableHeaderRenderer; + /** Optional inline style to apply to this column's header */ + headerStyle?: React.CSSProperties; + /** Optional id to set on the column header; used for aria-describedby */ + id?: string; /** Header label for this column */ label?: string; /** Maximum width of column; this property will only be used if :flexGrow is > 0. */ @@ -97,8 +103,6 @@ export type ColumnProps = { style?: React.CSSProperties; /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */ width: number; - /** Optional id to set on the column header; used for aria-describedby */ - id?: string; } export class Column extends Component { static propTypes: { diff --git a/types/react-virtualized/react-virtualized-tests.tsx b/types/react-virtualized/react-virtualized-tests.tsx index c5958ab96c..d912c1f28f 100644 --- a/types/react-virtualized/react-virtualized-tests.tsx +++ b/types/react-virtualized/react-virtualized-tests.tsx @@ -1546,12 +1546,14 @@ export class TableExample extends PureComponent<{}, any> { } dataKey='index' disableSort={!this._isSortEnabled()} + defaultSortDirection={SortDirection.DESC} width={60} /> }