Skip to content

Commit

Permalink
Use column utils to get column
Browse files Browse the repository at this point in the history
  • Loading branch information
malonecj committed Apr 20, 2017
1 parent 5fcddc6 commit 73c920f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-data-grid/src/EmptyChildRow.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import ColumnUtils from './ColumnUtils';

class EmptyChildRow extends React.Component {

Expand All @@ -21,7 +22,7 @@ class EmptyChildRow extends React.Component {
height: cellHeight,
borderBottom: '1px solid #dddddd'
};
let expandColumn = this.props.columns.filter(c => c.key === this.props.subRowDetails.field)[0];
let expandColumn = ColumnUtils.getColumn(this.props.columns.filter(c => c.key === this.props.subRowDetails.field), 0);
let cellLeft = expandColumn ? expandColumn.left : 0;
return (<div className="react-grid-Row" style={style}>
<div className="react-grid-Cell" style={{ position: 'absolute', height: cellHeight, width: '100%', cellLeft: cellLeft }}>
Expand Down

0 comments on commit 73c920f

Please sign in to comment.