File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class RNFadedScrollView extends Component {
8
8
constructor ( props ) {
9
9
super ( props ) ;
10
10
this . state = {
11
- // We don't know the size of the content initially, and the probably won't instantly try to scroll,
11
+ // We don't know the size of the content initially, and the probably won't instantly try to scroll,
12
12
// so set the initial content height and width to 0
13
13
scrollHeight : 0 ,
14
14
scrollWidth : 0 ,
@@ -23,6 +23,10 @@ class RNFadedScrollView extends Component {
23
23
onContentSizeChange = ( contentWidth , contentHeight ) => {
24
24
// Save the content height in state
25
25
this . setState ( { scrollHeight : contentHeight , scrollWidth : contentWidth } ) ;
26
+
27
+ const { onContentSizeChange } = this . props ;
28
+ if ( onContentSizeChange )
29
+ onContentSizeChange ( contentWidth , contentHeight ) ;
26
30
} ;
27
31
28
32
_onLayout ( event ) {
You can’t perform that action at this time.
0 commit comments