@@ -385,10 +385,11 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
385385 ) ;
386386 this . state = {
387387 first : this . props . initialScrollIndex || 0 ,
388- last : Math . min (
389- this . props . getItemCount ( this . props . data ) ,
390- ( this . props . initialScrollIndex || 0 ) + this . props . initialNumToRender ,
391- ) - 1 ,
388+ last :
389+ Math . min (
390+ this . props . getItemCount ( this . props . data ) ,
391+ ( this . props . initialScrollIndex || 0 ) + this . props . initialNumToRender ,
392+ ) - 1 ,
392393 } ;
393394 }
394395
@@ -496,8 +497,9 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
496497
497498 _isNestedWithSameOrientation ( ) : boolean {
498499 const nestedContext = this . context . virtualizedList ;
499- return ! ! ( nestedContext &&
500- ! ! nestedContext . horizontal === ! ! this . props . horizontal ) ;
500+ return ! ! (
501+ nestedContext && ! ! nestedContext . horizontal === ! ! this . props . horizontal
502+ ) ;
501503 }
502504
503505 render ( ) {
@@ -519,8 +521,8 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
519521 const isVirtualizationDisabled = this . _isVirtualizationDisabled ( ) ;
520522 const inversionStyle = this . props . inverted
521523 ? this . props . horizontal
522- ? styles . horizontallyInverted
523- : styles . verticallyInverted
524+ ? styles . horizontallyInverted
525+ : styles . verticallyInverted
524526 : null ;
525527 const cells = [ ] ;
526528 const stickyIndicesFromProps = new Set ( this . props . stickyHeaderIndices ) ;
@@ -680,7 +682,12 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
680682 cells ,
681683 ) ;
682684 if ( this . props . debug ) {
683- return < View style = { { flex : 1 } } > { ret } { this . _renderDebugOverlay ( ) } </ View > ;
685+ return (
686+ < View style = { { flex : 1 } } >
687+ { ret }
688+ { this . _renderDebugOverlay ( ) }
689+ </ View >
690+ ) ;
684691 } else {
685692 return ret ;
686693 }
@@ -840,7 +847,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
840847 borderColor : 'blue' ,
841848 borderWidth : 1 ,
842849 } } >
843- { framesInLayout . map ( ( f , ii ) => (
850+ { framesInLayout . map ( ( f , ii ) =>
844851 < View
845852 key = { 'f' + ii }
846853 style = { {
@@ -850,8 +857,8 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
850857 height : f . length * normalize ,
851858 backgroundColor : 'orange' ,
852859 } }
853- />
854- ) ) }
860+ /> ,
861+ ) }
855862 < View
856863 style = { {
857864 ...baseStyle ,
@@ -1047,10 +1054,10 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
10471054 } else {
10481055 const { contentLength, offset, visibleLength} = this . _scrollMetrics ;
10491056 const distanceFromEnd = contentLength - visibleLength - offset ;
1050- const renderAhead = distanceFromEnd <
1051- onEndReachedThreshold * visibleLength
1052- ? this . props . maxToRenderPerBatch
1053- : 0 ;
1057+ const renderAhead =
1058+ distanceFromEnd < onEndReachedThreshold * visibleLength
1059+ ? this . props . maxToRenderPerBatch
1060+ : 0 ;
10541061 newState = {
10551062 first : 0 ,
10561063 last : Math . min ( state . last + renderAhead , getItemCount ( data ) - 1 ) ,
@@ -1121,7 +1128,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
11211128 { frame : frameType } ,
11221129 { frame} ,
11231130 'frame' ,
1124- 'VirtualizedList.getItemLayout'
1131+ 'VirtualizedList.getItemLayout' ,
11251132 ) ;
11261133 }
11271134 }
@@ -1221,11 +1228,10 @@ class CellRenderer extends React.Component {
12211228 index,
12221229 separators : this . _separators ,
12231230 } ) ;
1224- const onLayout = getItemLayout &&
1225- ! parentProps . debug &&
1226- ! fillRateHelper . enabled ( )
1227- ? undefined
1228- : this . props . onLayout ;
1231+ const onLayout =
1232+ getItemLayout && ! parentProps . debug && ! fillRateHelper . enabled ( )
1233+ ? undefined
1234+ : this . props . onLayout ;
12291235 // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and
12301236 // called explicitly by `ScrollViewStickyHeader`.
12311237 return (
0 commit comments