From 04e78bda6970ef8b5e96fd1cae08aa3d9d02945e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Sat, 31 May 2025 22:44:18 +0200 Subject: [PATCH] fix: set initial size fill full screen --- .changeset/all-dryers-study.md | 5 +++++ packages/react-native-bottom-tabs/src/TabView.tsx | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/all-dryers-study.md diff --git a/.changeset/all-dryers-study.md b/.changeset/all-dryers-study.md new file mode 100644 index 00000000..027aa625 --- /dev/null +++ b/.changeset/all-dryers-study.md @@ -0,0 +1,5 @@ +--- +'react-native-bottom-tabs': patch +--- + +fix: set initial size to full screen diff --git a/packages/react-native-bottom-tabs/src/TabView.tsx b/packages/react-native-bottom-tabs/src/TabView.tsx index 3e490f67..dd71356e 100644 --- a/packages/react-native-bottom-tabs/src/TabView.tsx +++ b/packages/react-native-bottom-tabs/src/TabView.tsx @@ -7,6 +7,7 @@ import type { } from './TabViewNativeComponent'; import { type ColorValue, + type DimensionValue, Image, Platform, StyleSheet, @@ -198,8 +199,8 @@ const TabView = ({ const customTabBarWrapperRef = useRef(null); const [tabBarHeight, setTabBarHeight] = React.useState(0); const [measuredDimensions, setMeasuredDimensions] = React.useState< - { width: number; height: number } | undefined - >(); + { width: DimensionValue; height: DimensionValue } | undefined + >({ width: '100%', height: '100%' }); const trimmedRoutes = React.useMemo(() => { if (