Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import Row from './Row';
  2. ...
  3. render () {
  4. return (
  5. <AutoSizer disableHeight>
  6. {({ width })} => (
  7. <List
  8. height={200}
  9. width={width}
  10. rowCount={this.props.list.size}
  11. rowRenderer={this.rowRenderer}
  12. rowHeight={24}
  13. />
  14. )}
  15. </AutoSizer>
  16. );
  17. }
  18. rowRenderer = ({ key, style, index, parent }) => {
  19. const row = this.props.list.get(index);
  20. return (
  21. <Row
  22. row={row}
  23. style={style}
  24. rowIndex={index}
  25. parent={parent}
  26. columnIndex={0}
  27. />
  28. );
  29. }
  30.  
  31. .ReactVirtualized__Grid.ReactVirtualized__List {
  32. will-change: unset !important;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement