Skip to content

Commit

Permalink
Subgrid Icons are not Displayed if Metadata
Browse files Browse the repository at this point in the history
Fix for the following issue:
The component or characters that are added into the first column of a subgrid row
(parentRowCollapsedComponent and parentRowExpandedComponent, default or custom) are
not displayed when a metadata object (from columnMetadata) exists for this first column.
  • Loading branch information
Chris Main committed Jan 4, 2016
1 parent bf33680 commit 29aaaef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/gridRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,13 @@ var GridRow = React.createClass({
columnStyles = _.extend(columnStyles, {paddingLeft:10})
}

if (this.props.columnSettings.hasColumnMetadata() && typeof meta !== "undefined"){
var colData = (typeof meta.customComponent === 'undefined' || meta.customComponent === null) ? col[1] : <meta.customComponent data={col[1]} rowData={dataView} metadata={meta} />;
returnValue = (meta == null ? returnValue : <td onClick={this.handleClick} className={meta.cssClassName} key={index} style={columnStyles}>{colData}</td>);
if (this.props.columnSettings.hasColumnMetadata() && typeof meta !== 'undefined' && meta !== null) {
if (typeof meta.customComponent !== 'undefined' && meta.customComponent !== null) {
var customComponent = <meta.customComponent data={col[1]} rowData={dataView} metadata={meta} />;
returnValue = <td onClick={this.handleClick} className={meta.cssClassName} key={index} style={columnStyles}>{customComponent}</td>;
} else {
returnValue = <td onClick={this.handleClick} className={meta.cssClassName} key={index} style={columnStyles}>{firstColAppend}{col[1]}</td>;
}
}

return returnValue || (<td onClick={this.handleClick} key={index} style={columnStyles}>{firstColAppend}{col[1]}</td>);
Expand Down

0 comments on commit 29aaaef

Please sign in to comment.