Skip to content

Commit fee50c4

Browse files
author
Hailey Ryu
committed
Need to compute the item list before it gets into the itemRenderer.
1 parent 45982b2 commit fee50c4

File tree

1 file changed

+6
-2
lines changed
  • graphql-example/src/components

1 file changed

+6
-2
lines changed

graphql-example/src/components/List.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,19 @@ const List = kind({
2727
userId: PropTypes.string
2828
},
2929

30-
render: ({list}) => {
30+
computed: {
31+
itemRenderer: renderItem
32+
},
33+
34+
render: ({list, itemRenderer}) => {
3135
return [
3236
<Cell key="header" shrink><Divider>Repositories</Divider></Cell>,
3337
<Cell
3438
component={VirtualList} size={list.length <= 4 ? (60 * list.length) : null}
3539
key="list"
3640
dataSize={list.length}
3741
focusableScrollbar={null}
38-
itemRenderer={renderItem}
42+
itemRenderer={itemRenderer}
3943
itemSize={scale(60)}
4044
spacing={0}
4145
/>];

0 commit comments

Comments
 (0)