File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,7 @@ class VirtualizedSectionList<
374
374
section = { info . section }
375
375
trailingItem = { info . trailingItem }
376
376
trailingSection = { info . trailingSection }
377
+ inverted = { ! ! this . props . inverted }
377
378
/>
378
379
) ;
379
380
}
@@ -435,6 +436,7 @@ type ItemWithSeparatorProps = $ReadOnly<{|
435
436
onUpdateSeparator : ( cellKey : string , newProps : Object ) => void ,
436
437
prevCellKey ?: ?string ,
437
438
renderItem : Function ,
439
+ inverted : boolean ,
438
440
| } > ;
439
441
440
442
type ItemWithSeparatorState = {
@@ -534,6 +536,7 @@ class ItemWithSeparator extends React.Component<
534
536
item,
535
537
index,
536
538
section,
539
+ inverted,
537
540
} = this . props ;
538
541
const element = this . props . renderItem ( {
539
542
item,
@@ -552,9 +555,9 @@ class ItemWithSeparator extends React.Component<
552
555
* error found when Flow v0.89 was deployed. To see the error, delete
553
556
* this comment and run Flow. */
554
557
< View >
555
- { leadingSeparator }
558
+ { ! inverted ? leadingSeparator : separator }
556
559
{ element }
557
- { separator }
560
+ { ! inverted ? separator : leadingSeparator }
558
561
</ View >
559
562
) : (
560
563
element
Original file line number Diff line number Diff line change @@ -751,10 +751,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
751
751
}
752
752
>
753
753
<View >
754
+ <separator />
754
755
<item
755
756
value = " 0"
756
757
/>
757
- <separator />
758
758
</View >
759
759
</View >
760
760
<View
@@ -774,10 +774,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
774
774
}
775
775
>
776
776
<View >
777
+ <separator />
777
778
<item
778
779
value = " 1"
779
780
/>
780
- <separator />
781
781
</View >
782
782
</View >
783
783
<View
@@ -797,10 +797,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
797
797
}
798
798
>
799
799
<View >
800
+ <separator />
800
801
<item
801
802
value = " 2"
802
803
/>
803
- <separator />
804
804
</View >
805
805
</View >
806
806
<View
@@ -820,10 +820,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
820
820
}
821
821
>
822
822
<View >
823
+ <separator />
823
824
<item
824
825
value = " 3"
825
826
/>
826
- <separator />
827
827
</View >
828
828
</View >
829
829
<View
You can’t perform that action at this time.
0 commit comments