fix #863 - expanded row column span does not update (#837)

This commit is contained in:
Norbert Nemeth
2019-03-09 11:46:04 +01:00
committed by Allen
parent 921e8c7ecc
commit e44782f222
2 changed files with 3 additions and 4 deletions

View File

@@ -17,7 +17,6 @@ class Body extends React.Component {
super(props);
const {
keyField,
visibleColumnSize,
cellEdit,
selectRow,
expandRow
@@ -34,7 +33,7 @@ class Body extends React.Component {
const expandRowEnabled = !!expandRow.renderer;
if (expandRowEnabled) {
RowComponent = withRowExpansion(RowAggregator, visibleColumnSize);
RowComponent = withRowExpansion(RowAggregator);
}
if (selectRowEnabled) {

View File

@@ -3,7 +3,7 @@ import React from 'react';
import ExpandRow from './expand-row';
import ExpansionContext from '../contexts/row-expand-context';
export default (Component, visibleColumnSize) => {
export default (Component) => {
const renderWithExpansion = (props, expandRow) => {
const key = props.value;
@@ -20,7 +20,7 @@ export default (Component, visibleColumnSize) => {
/>,
expanded ? <ExpandRow
key={ `${key}-expanding` }
colSpan={ visibleColumnSize }
colSpan={ props.visibleColumnSize }
>
{ expandRow.renderer(props.row) }
</ExpandRow> : null