@@ -59,9 +59,6 @@ type RequiredProps = {
5959 data ?: any ,
6060} ;
6161type OptionalProps = {
62- FooterComponent ?: ?ReactClass < any > ,
63- HeaderComponent ?: ?ReactClass < any > ,
64- SeparatorComponent ?: ?ReactClass < any > ,
6562 /**
6663 * `debug` will turn on extra logging and visual overlays to aid with debugging both usage and
6764 * implementation, but with a significant perf hit.
@@ -305,6 +302,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
305302 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' +
306303 'to support native onScroll events with useNativeDriver' ,
307304 ) ;
305+
308306 this . _updateCellsToRenderBatcher = new Batchinator (
309307 this . _updateCellsToRender ,
310308 this . props . updateCellsBatchingPeriod ,
@@ -334,7 +332,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
334332 }
335333
336334 _pushCells ( cells , first , last ) {
337- const { SeparatorComponent , data, getItem, getItemCount, keyExtractor} = this . props ;
335+ const { ItemSeparatorComponent , data, getItem, getItemCount, keyExtractor} = this . props ;
338336 const end = getItemCount ( data ) - 1 ;
339337 last = Math . min ( end , last ) ;
340338 for ( let ii = first ; ii <= last ; ii ++ ) {
@@ -352,19 +350,19 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
352350 parentProps = { this . props }
353351 />
354352 ) ;
355- if ( SeparatorComponent && ii < end ) {
356- cells . push ( < SeparatorComponent key = { 'sep' + ii } /> ) ;
353+ if ( ItemSeparatorComponent && ii < end ) {
354+ cells . push ( < ItemSeparatorComponent key = { 'sep' + ii } /> ) ;
357355 }
358356 }
359357 }
360358 render ( ) {
361- const { FooterComponent , HeaderComponent } = this . props ;
359+ const { ListFooterComponent , ListHeaderComponent } = this . props ;
362360 const { data, disableVirtualization, horizontal} = this . props ;
363361 const cells = [ ] ;
364- if ( HeaderComponent ) {
362+ if ( ListHeaderComponent ) {
365363 cells . push (
366364 < View key = "$header" onLayout = { this . _onLayoutHeader } >
367- < HeaderComponent />
365+ < ListHeaderComponent />
368366 </ View >
369367 ) ;
370368 }
@@ -404,10 +402,10 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
404402 ) ;
405403 }
406404 }
407- if ( FooterComponent ) {
405+ if ( ListFooterComponent ) {
408406 cells . push (
409407 < View key = "$footer" onLayout = { this . _onLayoutFooter } >
410- < FooterComponent />
408+ < ListFooterComponent />
411409 </ View >
412410 ) ;
413411 }
0 commit comments