feat: add screenListeners prop on navigators similar to screenOptions

This commit is contained in:
Satyajit Sahoo
2021-05-26 00:35:34 +02:00
parent aa77f0618b
commit cde44a5785
9 changed files with 81 additions and 19 deletions

View File

@@ -17,7 +17,12 @@ import type {
MaterialBottomTabNavigationEventMap,
} from '../types';
type Props = DefaultNavigatorOptions<MaterialBottomTabNavigationOptions> &
type Props = DefaultNavigatorOptions<
ParamListBase,
TabNavigationState<ParamListBase>,
MaterialBottomTabNavigationOptions,
MaterialBottomTabNavigationEventMap
> &
TabRouterOptions &
MaterialBottomTabNavigationConfig;
@@ -25,6 +30,7 @@ function MaterialBottomTabNavigator({
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
...rest
}: Props) {
@@ -43,6 +49,7 @@ function MaterialBottomTabNavigator({
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
});