Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Check cardStyleInterpolator name to allow for custom animation as well #11209

Merged
merged 1 commit into from Feb 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions packages/stack/src/views/Stack/CardStack.tsx
Expand Up @@ -18,10 +18,7 @@ import {
} from 'react-native';
import type { EdgeInsets } from 'react-native-safe-area-context';

import {
forModalPresentationIOS,
forNoAnimation as forNoAnimationCard,
} from '../../TransitionConfigs/CardStyleInterpolators';
import { forNoAnimation as forNoAnimationCard } from '../../TransitionConfigs/CardStyleInterpolators';
import {
DefaultTransition,
ModalFadeTransition,
Expand Down Expand Up @@ -522,8 +519,10 @@ export default class CardStack extends React.Component<Props, State> {
: getIsModalPresentation(options.cardStyleInterpolator)
? i !==
scenes
.map((scene) => scene.descriptor.options.cardStyleInterpolator)
.lastIndexOf(forModalPresentationIOS)
.map(
(scene) => scene.descriptor.options.cardStyleInterpolator.name
)
.lastIndexOf('forModalPresentationIOS')
: true,
} = options;

Expand Down