Skip to content

Commit

Permalink
moved the forwardedRef to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1206agra committed Aug 10, 2023
1 parent ef95fc0 commit 2d5f2a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-native-web/src/exports/ScrollView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,10 +698,7 @@ class ScrollView extends React.Component<ScrollViewProps> {

_setInnerViewRef = (node) => {
this._innerViewRef = node;
};

_setScrollNodeRef = (node) => {
this._scrollNodeRef = node;
// ScrollView needs to add more methods to the hostNode in addition to those
// added by `usePlatformMethods`. This is temporarily until an API like
// `ScrollView.scrollTo(hostNode, { x, y })` is added to React Native.
Expand All @@ -721,6 +718,10 @@ class ScrollView extends React.Component<ScrollViewProps> {
const ref = mergeRefs(this.props.forwardedRef);
ref(node);
};

_setScrollNodeRef = (node) => {
this._scrollNodeRef = node;
};
}

const commonStyle = {
Expand Down

0 comments on commit 2d5f2a3

Please sign in to comment.