mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-23 04:00:15 +08:00
fix: fix default BottomTabBar button (#161)
This commit is contained in:
committed by
Satyajit Sahoo
parent
c41c824aae
commit
22cb675608
@@ -13,7 +13,6 @@ import { Route, NavigationContext } from '@react-navigation/core';
|
||||
import { SafeAreaConsumer } from 'react-native-safe-area-context';
|
||||
|
||||
import TabBarIcon from './TabBarIcon';
|
||||
import TouchableWithoutFeedbackWrapper from './TouchableWithoutFeedbackWrapper';
|
||||
import { BottomTabBarProps, BottomTabBarButtonProps } from '../types';
|
||||
|
||||
type State = {
|
||||
@@ -265,9 +264,7 @@ export default class TabBarBottom extends React.Component<Props, State> {
|
||||
getAccessibilityLabel,
|
||||
getAccessibilityRole,
|
||||
getAccessibilityStates,
|
||||
renderButton = (props: BottomTabBarButtonProps) => (
|
||||
<TouchableWithoutFeedbackWrapper {...props} />
|
||||
),
|
||||
renderButton,
|
||||
getTestID,
|
||||
style,
|
||||
tabStyle,
|
||||
|
||||
@@ -5,12 +5,14 @@ import {
|
||||
AccessibilityRole,
|
||||
AccessibilityStates,
|
||||
} from 'react-native';
|
||||
|
||||
import { Route, CommonActions } from '@react-navigation/core';
|
||||
import { TabNavigationState } from '@react-navigation/routers';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import { ScreenContainer } from 'react-native-screens';
|
||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||
|
||||
import TouchableWithoutFeedbackWrapper from './TouchableWithoutFeedbackWrapper';
|
||||
import ResourceSavingScene from './ResourceSavingScene';
|
||||
import BottomTabBar from './BottomTabBar';
|
||||
import {
|
||||
@@ -63,7 +65,7 @@ export default class BottomTabView extends React.Component<Props, State> {
|
||||
return options.tabBarButton(rest);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
return <TouchableWithoutFeedbackWrapper {...rest} />;
|
||||
};
|
||||
|
||||
private renderIcon = ({
|
||||
|
||||
Reference in New Issue
Block a user