Skip to content

Commit 7f17c37

Browse files
authored
Fix type for maxColumnSort to match prop-types (#672)
Without this, you get a TS error trying to set `maxColumnSort` to 0, which prevents you from turning off sorting. This adds 0 as an option, like it is with the `PropTypes` definition here https://github.com/material-table-core/core/blob/8dc35d85df2f87a77d067cae1fa5713fbb465f82/src/prop-types.js#L387 Co-authored-by: Steven DeMartini <sjdemartini@users.noreply.github.com>
1 parent c4cb66e commit 7f17c37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ export interface Options<RowData extends object> {
450450
detailPanelOffset?: { left?: number; right?: number };
451451
cspNonce?: string;
452452
defaultOrderByCollection?: OrderByCollection[];
453-
maxColumnSort?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ALL_COLUMNS;
453+
maxColumnSort?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ALL_COLUMNS;
454454
showColumnSortOrder?: boolean;
455455
sortOrderIndicatorStyle?: React.CSSProperties;
456456
}

0 commit comments

Comments
 (0)