I'm trying to get started using react-virtualized, and I have been having a lot of trouble getting started. The documentation is very sparse.
I am trying to use the following example:
import { Grid, List, ScrollSync } from 'react-virtualized'
import 'react-virtualized/styles.css'; // only needs to be imported once
function render (props) {
return (
<ScrollSync>
{({ clientHeight, clientWidth, onScroll, scrollHeight, scrollLeft, scrollTop, scrollWidth }) => (
<div className='Table'>
<div className='LeftColumn'>
<List
scrollTop={scrollTop}
{...props}
/>
</div>
<div className='RightColumn'>
<Grid
onScroll={onScroll}
{...props}
/>
</div>
</div>
)}
</ScrollSync>
)
}
I have it in a separate .tsx file. I am then trying to use it in the following component:
export class Container extends React.Component<any, any>{
constructor(props: any) {
super(props);
this.state = {
modal: this.props.name,
};
}
public render() {
return <div>
<div className="grid2" >
<div className="containdiv">
//I want it here
</div >
</div >
</div>
}
}
Anyone more familiar with typescript and react-virtualized have an idea how I can get this working? Or have any secret documentation I wasn't able to find?