Skip to content

Commit

Permalink
Add flag for disabling swipe gestures in stack routers.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswilddev committed Sep 5, 2022
1 parent c1303cc commit 93062c1
Show file tree
Hide file tree
Showing 5 changed files with 938 additions and 543 deletions.
6 changes: 4 additions & 2 deletions react-native/components/createStackRoutingComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ export const createStackRoutingComponent = <
}}
onBack={props.onBack}
allowsSwiping={
index > 0 && index === props.routeState.length - 1
index > 0 &&
index === props.routeState.length - 1 &&
routeTable[item.key].allowsSwiping
}
>
{React.createElement(routeTable[item.key], {
{React.createElement(routeTable[item.key].component, {
parameters: item.parameters,
push: (...itemsToAdd) => {
props.setRouteState([...props.routeState, ...itemsToAdd]);
Expand Down
Loading

0 comments on commit 93062c1

Please sign in to comment.