Skip to content

Commit a18f774

Browse files
committed
Add a passthrough for the ref prop
1 parent 1d5c314 commit a18f774

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/InfiniteScroll.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export default class InfiniteScroll extends Component {
134134
loader,
135135
loadMore,
136136
pageStart,
137+
ref,
137138
threshold,
138139
useCapture,
139140
useWindow,
@@ -142,6 +143,9 @@ export default class InfiniteScroll extends Component {
142143

143144
props.ref = (node) => {
144145
this.scrollComponent = node;
146+
if(ref) {
147+
ref(node);
148+
}
145149
};
146150

147151
const childrenArray = [children];

0 commit comments

Comments
 (0)