Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/all-dryers-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-native-bottom-tabs': patch
---

fix: set initial size to full screen
5 changes: 3 additions & 2 deletions packages/react-native-bottom-tabs/src/TabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
} from './TabViewNativeComponent';
import {
type ColorValue,
type DimensionValue,
Image,
Platform,
StyleSheet,
Expand Down Expand Up @@ -198,8 +199,8 @@
const customTabBarWrapperRef = useRef<View>(null);
const [tabBarHeight, setTabBarHeight] = React.useState<number | undefined>(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 (
Expand All @@ -221,7 +222,7 @@

if (!loaded.includes(focusedKey)) {
// Set the current tab to be loaded if it was not loaded before
setLoaded((loaded) => [...loaded, focusedKey]);

Check warning on line 225 in packages/react-native-bottom-tabs/src/TabView.tsx

View workflow job for this annotation

GitHub Actions / lint

'loaded' is already declared in the upper scope on line 221 column 10
}

const icons = React.useMemo(
Expand Down
Loading