Created
July 16, 2017 11:46
-
-
Save adamkleingit/7ee7456c60290b24f40f25b91be73e90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const renderGridRowCell = (colConfig, row, index) => { | |
const CustomValue = colConfig.component; | |
const value = CustomValue ? <CustomValue data={ row }/> : row[colConfig.field]; | |
return <td key={ index }>{ value }</td>; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const renderGridRowCell = ({ Component: component, field }, row, index) => ( | |
<td key={ index }> | |
{ | |
Component ? <Component data={ row }/> : row[field] | |
} | |
</td> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment