Skip to content

Commit 7388b92

Browse files
committed
Fix statics in withScrollEnabler and withScrollReached
1 parent 39a94c0 commit 7388b92

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/commons/withScrollEnabler.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ function withScrollEnabler<PROPS, STATICS = {}>(
7777
};
7878

7979
hoistStatics(ScrollEnabler, WrappedComponent);
80+
ScrollEnabler.displayName = WrappedComponent.displayName;
81+
ScrollEnabler.propTypes = WrappedComponent.propTypes;
82+
ScrollEnabler.defaultProps = WrappedComponent.defaultProps;
8083
return forwardRef(ScrollEnabler) as any;
8184
}
8285

src/commons/withScrollReached.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ function withScrollReached<PROPS, STATICS = {}>(
101101
};
102102

103103
hoistStatics(ScrollReachedDetector, WrappedComponent);
104+
ScrollReachedDetector.displayName = WrappedComponent.displayName;
105+
ScrollReachedDetector.propTypes = WrappedComponent.propTypes;
106+
ScrollReachedDetector.defaultProps = WrappedComponent.defaultProps;
104107
return forwardRef(ScrollReachedDetector) as any;
105108
}
106109

0 commit comments

Comments
 (0)