Skip to content

Instantly share code, notes, and snippets.

@bdkent
Created April 21, 2017 22:10
Show Gist options
  • Select an option

  • Save bdkent/542d396971a4471401e1fa92085e432e to your computer and use it in GitHub Desktop.

Select an option

Save bdkent/542d396971a4471401e1fa92085e432e to your computer and use it in GitHub Desktop.
trying to use a react-virtualized table
<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