mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-07 17:28:56 +08:00
fix: add missing descriptor obtaining (#340)
This commit is contained in:
@@ -556,7 +556,7 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx sr
|
||||
- });
|
||||
+ ) => {
|
||||
+ const { descriptors } = this.props;
|
||||
+ const descriptor = descriptors[route.key];
|
||||
+ const descriptor = descriptors[route.key] || this.state.descriptors[route.key];
|
||||
+
|
||||
+ descriptor &&
|
||||
+ descriptor.options.onTransitionStart &&
|
||||
@@ -574,7 +574,7 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx sr
|
||||
- });
|
||||
+ ) => {
|
||||
+ const { descriptors } = this.props;
|
||||
+ const descriptor = descriptors[route.key];
|
||||
+ const descriptor = descriptors[route.key] || this.state.descriptors[route.key];
|
||||
+
|
||||
+ descriptor &&
|
||||
+ descriptor.options.onTransitionEnd &&
|
||||
|
||||
Reference in New Issue
Block a user