This commit is contained in:
AllenFang
2019-03-09 23:00:59 +08:00
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