Skip to content

Commit

Permalink
fix(react-grid): correct getCellWidth property's default value (#2353)
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyLahtak committed Sep 25, 2019
1 parent 8f869a7 commit 9fde9b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Expand Up @@ -40,12 +40,12 @@ export class TableHeaderCell extends React.PureComponent {
render() {
const {
style, column, tableColumn,
showGroupingControls, onGroup, groupingEnabled,
draggingEnabled, resizingEnabled,
onWidthChange, onWidthDraft, onWidthDraftCancel,
onWidthChange, onWidthDraft, onWidthDraftCancel, getCellWidth,
tableRow, children,
// @deprecated
showSortingControls, sortingDirection, sortingEnabled, onSort, before, getCellWidth,
showGroupingControls, onGroup, groupingEnabled,
showSortingControls, sortingDirection, sortingEnabled, onSort, before,
...restProps
} = this.props;
const { dragging } = this.state;
Expand Down Expand Up @@ -143,5 +143,5 @@ TableHeaderCell.defaultProps = {
onWidthDraftCancel: undefined,
children: undefined,
before: undefined,
getCellWidth: undefined,
getCellWidth: () => {},
};
Expand Up @@ -41,12 +41,12 @@ export class TableHeaderCell extends React.PureComponent {
render() {
const {
className, column, tableColumn,
showGroupingControls, onGroup, groupingEnabled,
draggingEnabled, onWidthDraftCancel,
resizingEnabled, onWidthChange, onWidthDraft,
resizingEnabled, onWidthChange, onWidthDraft, getCellWidth,
tableRow, children,
// @deprecated
showSortingControls, sortingDirection, sortingEnabled, onSort, before, getCellWidth,
showGroupingControls, onGroup, groupingEnabled,
showSortingControls, sortingDirection, sortingEnabled, onSort, before,
...restProps
} = this.props;
const { dragging } = this.state;
Expand Down Expand Up @@ -136,5 +136,5 @@ TableHeaderCell.defaultProps = {
onWidthDraft: undefined,
onWidthDraftCancel: undefined,
children: undefined,
getCellWidth: undefined,
getCellWidth: () => {},
};
Expand Up @@ -126,12 +126,12 @@ class TableHeaderCellBase extends React.PureComponent {
render() {
const {
style, column, tableColumn,
showGroupingControls, onGroup, groupingEnabled,
draggingEnabled,
resizingEnabled, onWidthChange, onWidthDraft, onWidthDraftCancel,
draggingEnabled, resizingEnabled,
onWidthChange, onWidthDraft, onWidthDraftCancel, getCellWidth,
classes, tableRow, className, children,
// @deprecated
showSortingControls, sortingDirection, sortingEnabled, onSort, before, getCellWidth,
showGroupingControls, onGroup, groupingEnabled,
showSortingControls, sortingDirection, sortingEnabled, onSort, before,
...restProps
} = this.props;

Expand Down Expand Up @@ -226,7 +226,7 @@ TableHeaderCellBase.defaultProps = {
className: undefined,
children: undefined,
before: undefined,
getCellWidth: undefined,
getCellWidth: () => {},
};

export const TableHeaderCell = withStyles(styles, { name: 'TableHeaderCell' })(TableHeaderCellBase);

0 comments on commit 9fde9b0

Please sign in to comment.