@@ -7,9 +7,10 @@ import {usePrevious} from "../helpers/usePrevious";
77const isJSX = element => typeof element !== 'function' && typeof element ?. type === 'object' ;
88const isMemo = element => typeof element !== 'function' && typeof element ?. type === 'function' ;
99
10- export default function Swiper ( { style, data, isStaticPills, initialScrollIndex, stickyHeaderEnabled, children, scrollableContainer, ...rest } ) {
10+ export default function Swiper ( { style, data, isStaticPills, initialScrollIndex, stickyHeaderEnabled, children, stickyHeaderIndex , scrollableContainer, ...rest } ) {
1111 const width = useWindowDimensions ( ) . width ;
1212 const flatList = useRef ( null ) ;
13+ const containerRef = useRef ( null ) ;
1314 const scrollViewRef = useRef ( null ) ;
1415 const [ currentIndex , setCurrentIndex ] = useState ( initialScrollIndex || 0 ) ;
1516 const prevIndex = usePrevious ( currentIndex ) ;
@@ -58,8 +59,10 @@ export default function Swiper({style, data, isStaticPills, initialScrollIndex,
5859
5960 return (
6061 < Container
62+ containerRef = { containerRef }
6163 stickyHeaderEnabled = { stickyHeaderEnabled }
6264 scrollableContainer = { scrollableContainer }
65+ stickyHeaderIndex = { stickyHeaderIndex }
6366 >
6467 { children }
6568 < View style = { [ style ?. pillsOverflow ] } >
@@ -71,6 +74,8 @@ export default function Swiper({style, data, isStaticPills, initialScrollIndex,
7174 ] } >
7275 { ! ! isStaticPills && (
7376 < StaticPills
77+ containerRef = { containerRef }
78+ scrollableContainer = { scrollableContainer }
7479 data = { data }
7580 currentIndex = { currentIndex }
7681 x = { x }
0 commit comments