Skip to content

Commit 3deed40

Browse files
committed
Improve container
1 parent b1d810c commit 3deed40

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

components/Container.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
22
import {ScrollView} from 'react-native';
33

4-
export default function Container({stickyHeaderEnabled, children, ...rest}) {
4+
export default function Container({stickyHeaderEnabled, children, scrollableContainer, ...rest}) {
55
return(
6-
stickyHeaderEnabled ? (
6+
scrollableContainer ? (
77
<ScrollView
88
stickyHeaderIndices={stickyHeaderEnabled ? [1] : null}
99
{...rest}

components/Swiper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {usePrevious} from "../helpers/usePrevious";
77
const isJSX = element => typeof element !== 'function' && typeof element?.type === 'object';
88
const isMemo = element => typeof element !== 'function' && typeof element?.type === 'function';
99

10-
export default function Swiper({style, data, isStaticPills, initialScrollIndex, stickyHeaderEnabled, children, ...rest}) {
10+
export default function Swiper({style, data, isStaticPills, initialScrollIndex, stickyHeaderEnabled, children, scrollableContainer, ...rest}) {
1111
const width = useWindowDimensions().width;
1212
const flatList = useRef(null);
1313
const scrollViewRef = useRef(null);
@@ -60,6 +60,7 @@ export default function Swiper({style, data, isStaticPills, initialScrollIndex,
6060
return (
6161
<Container
6262
stickyHeaderEnabled={stickyHeaderEnabled}
63+
scrollableContainer={scrollableContainer}
6364
>
6465
{children}
6566
<View style={{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-screens-swiper",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"description": "This lib. provide swiper view functionality with tab navigation on the top.",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)