Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react-grid): correct getCellWidth property's default value #2353

Merged
merged 5 commits into from Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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: () => {},
LazyLahtak marked this conversation as resolved.
Show resolved Hide resolved
};
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);
1 change: 1 addition & 0 deletions packages/dx-react-grid/docs/reference/table-header-row.md
Expand Up @@ -68,6 +68,7 @@ showSortingControls | boolean | **@deprecated** <br/> Specifies whether to rende
sortingEnabled | boolean | **@deprecated** <br/> Specifies whether sorting by the column is enabled.
sortingDirection? | 'asc' &#124; 'desc' | **@deprecated** <br/> Specifies the column's sorting direction.
onSort | (parameters: { direction?: 'asc' &#124; 'desc' &#124; null, keepOther?: boolean }) => void | **@deprecated** <br/> An event that invokes a sorting direction change. Keeps the current sorting state if `keepOther` is set to true. Cancels sorting by the current column if `direction` is set to null.
getCellWidth | (() => number) => void | A function that provides cell's width getter function to the TableColumnResizing component.

### TableHeaderRow.SortLabelProps

Expand Down