diff --git a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx index 7986a444b..c4ec0eeda 100644 --- a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx +++ b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroup.tsx @@ -11,7 +11,7 @@ import type { ViewPagerTabGroupProps } from './ViewPagerTabGroupProps'; import { withViewPagerTabGroupVariation } from './ViewPagerTabGroupProps'; export const ViewPagerTabGroup = withViewPagerTabGroupVariation( - ({ children, tabId, testId, onTabChange, tabSpacing }) => ( + ({ children, tabId, testId, onTabChange, tabSpacing, native_swipeEnabled = true }) => ( )} onTabChange={onTabChange} + native_swipeEnabled={native_swipeEnabled} > {children} diff --git a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts index f00f71858..4992f1bfd 100644 --- a/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts +++ b/packages/vibrant-components/src/lib/ViewPagerTabGroup/ViewPagerTabGroupProps.ts @@ -8,6 +8,7 @@ export type ViewPagerTabGroupProps = { tabId?: string; onTabChange?: () => void; testId?: string; + native_swipeEnabled?: boolean; }; export const withViewPagerTabGroupVariation = withVariation('ViewPagerTabGroup')(); diff --git a/packages/vibrant-core/src/lib/TabView/TabView.native.tsx b/packages/vibrant-core/src/lib/TabView/TabView.native.tsx index 2fb07e5c7..4bba26f47 100644 --- a/packages/vibrant-core/src/lib/TabView/TabView.native.tsx +++ b/packages/vibrant-core/src/lib/TabView/TabView.native.tsx @@ -7,7 +7,7 @@ import type { TabViewItemProps } from '../TabViewItem'; import { withTabViewVariation } from './TabViewProps'; export const TabView = withTabViewVariation( - ({ children, tabId, onTabChange, renderTobBarContainer, renderTobBarItem }) => { + ({ children, tabId, onTabChange, renderTobBarContainer, renderTobBarItem, native_swipeEnabled = true }) => { const childrenElement = Children.toArray(children).filter(isValidElement); const [currentIndex, setCurrentIndex] = useState( Math.max( @@ -75,6 +75,7 @@ export const TabView = withTabViewVariation( navigationState={{ index: currentIndex, routes }} renderScene={renderScene} onIndexChange={setCurrentIndex} + swipeEnabled={native_swipeEnabled} /> ); } diff --git a/packages/vibrant-core/src/lib/TabView/TabViewProps.ts b/packages/vibrant-core/src/lib/TabView/TabViewProps.ts index 9ee82467d..5edd0d77b 100644 --- a/packages/vibrant-core/src/lib/TabView/TabViewProps.ts +++ b/packages/vibrant-core/src/lib/TabView/TabViewProps.ts @@ -10,6 +10,7 @@ type TabViewProps = { renderTobBarContainer: (props: ReactElementChildren) => ReactElement; onTabChange?: () => void; testId?: string; + native_swipeEnabled?: boolean; }; export const withTabViewVariation = withVariation('TabView')();