mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Merge pull request #23319 from thevtm/react-virtualized-update-column-props
Add missing properties to React Virtualized > ColumnProps
This commit is contained in:
commit
aa36a6378f
8
types/react-virtualized/dist/es/Table.d.ts
vendored
8
types/react-virtualized/dist/es/Table.d.ts
vendored
@ -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<ColumnProps> {
|
||||
static propTypes: {
|
||||
|
||||
@ -1546,12 +1546,14 @@ export class TableExample extends PureComponent<{}, any> {
|
||||
}
|
||||
dataKey='index'
|
||||
disableSort={!this._isSortEnabled()}
|
||||
defaultSortDirection={SortDirection.DESC}
|
||||
width={60}
|
||||
/>
|
||||
}
|
||||
<Column
|
||||
dataKey='name'
|
||||
disableSort={!this._isSortEnabled()}
|
||||
defaultSortDirection={SortDirection.ASC}
|
||||
headerRenderer={this._headerRenderer}
|
||||
width={90}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user