From c4e8ea8b02f7babc3a706d6f2f50c84824280a2c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 19 Jan 2023 12:02:07 +0100 Subject: [PATCH] fix: add missing forwardRef to ScrollViewWithContext --- src/components/ScrollViewWithContext.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/ScrollViewWithContext.js b/src/components/ScrollViewWithContext.js index 6d6c74c33245..f8b58db119ce 100644 --- a/src/components/ScrollViewWithContext.js +++ b/src/components/ScrollViewWithContext.js @@ -22,7 +22,7 @@ class ScrollViewWithContext extends React.Component { this.state = { contentOffsetY: 0, }; - this.scrollViewRef = React.createRef(null); + this.scrollViewRef = this.props.innerRef || React.createRef(null); this.setContextScrollPosition = this.setContextScrollPosition.bind(this); } @@ -58,7 +58,11 @@ class ScrollViewWithContext extends React.Component { } ScrollViewWithContext.propTypes = propTypes; -export default ScrollViewWithContext; +export default React.forwardRef((props, ref) => ( + // eslint-disable-next-line react/jsx-props-no-spreading + +)); + export { ScrollContext, };