Skip to content

Commit

Permalink
fix: revert changes on BottomSheetModal that blocked stack behavour
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Sep 23, 2021
1 parent 366e46b commit 15225ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import com.android.build.OutputFile

project.ext.react = [
enableHermes: true,
entryFile: "index.tsx",
entryFile: "index.ts",
]

apply from: "../../node_modules/react-native/react.gradle"
Expand Down
2 changes: 1 addition & 1 deletion example/src/screens/modal/StackExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const StackExample = () => {
[]
);
const renderBottomSheetContent = useCallback(
onPress => <ContactList type="FlatList" onItemPress={onPress} />,
onPress => <ContactList type="FlatList" onItemPress={onPress} count={6} />,
[]
);
return (
Expand Down
7 changes: 2 additions & 5 deletions src/components/bottomSheetModal/BottomSheetModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ const BottomSheetModalComponent = forwardRef<
const handlePresent = useCallback(
function handlePresent() {
requestAnimationFrame(() => {
if (mount) {
bottomSheetRef.current?.snapToIndex(index);
return;
}
setMount(true);
mountSheet(key, ref, stackBehavior);

Expand All @@ -175,7 +171,8 @@ const BottomSheetModalComponent = forwardRef<
});
});
},
[key, index, stackBehavior, mount, ref, mountSheet]
// eslint-disable-next-line react-hooks/exhaustive-deps
[key, stackBehavior, mountSheet]
);
const handleDismiss = useCallback<BottomSheetModalMethods['dismiss']>(
function handleDismiss(animationConfigs) {
Expand Down

0 comments on commit 15225ae

Please sign in to comment.