Skip to content

Commit 41f662e

Browse files
authored
fix: set initial size fill full screen (#356)
1 parent 18a8d23 commit 41f662e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/all-dryers-study.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-native-bottom-tabs': patch
3+
---
4+
5+
fix: set initial size to full screen

packages/react-native-bottom-tabs/src/TabView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type {
77
} from './TabViewNativeComponent';
88
import {
99
type ColorValue,
10+
type DimensionValue,
1011
Image,
1112
Platform,
1213
StyleSheet,
@@ -198,8 +199,8 @@ const TabView = <Route extends BaseRoute>({
198199
const customTabBarWrapperRef = useRef<View>(null);
199200
const [tabBarHeight, setTabBarHeight] = React.useState<number | undefined>(0);
200201
const [measuredDimensions, setMeasuredDimensions] = React.useState<
201-
{ width: number; height: number } | undefined
202-
>();
202+
{ width: DimensionValue; height: DimensionValue } | undefined
203+
>({ width: '100%', height: '100%' });
203204

204205
const trimmedRoutes = React.useMemo(() => {
205206
if (

0 commit comments

Comments
 (0)