Created
April 21, 2017 22:10
-
-
Save bdkent/542d396971a4471401e1fa92085e432e to your computer and use it in GitHub Desktop.
trying to use a react-virtualized table
This file contains hidden or 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
| <div style={ {height: '500px'} }> | |
| <AutoSizer> | |
| { | |
| function (props) { | |
| var height = props.height; | |
| var width = props.width; | |
| return ( | |
| <Table height={height} width={width} rowCount={rowCount} rowHeight={25} headerHeight={50} | |
| className="table" rowGetter={rowGetter}> | |
| <Column | |
| width={50} | |
| label="name" | |
| dataKey="function" | |
| cellRenderer={renderName} | |
| /> | |
| <Column | |
| width={50} | |
| label="timestamp" | |
| dataKey="start" | |
| cellRenderer={renderTimestamp} | |
| /> | |
| <Column | |
| width={50} | |
| label="duration" | |
| dataKey="duration" | |
| cellRenderer={renderDuration} | |
| /> | |
| <Column | |
| width={50} | |
| label="args" | |
| dataKey="args" | |
| cellRenderer={renderTruncation} | |
| /> | |
| <Column | |
| width={50} | |
| label="result" | |
| dataKey="result" | |
| cellRenderer={renderTruncation} | |
| /> | |
| </Table> | |
| ); | |
| } | |
| } | |
| </AutoSizer> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment