Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

fix: Tab view height auto expand #1198

Closed
Closed
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
6 changes: 3 additions & 3 deletions src/SceneView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Props<T extends Route> = SceneRendererProps &
lazyPreloadDistance: number;
index: number;
children: (props: { loading: boolean }) => React.ReactNode;
style?: StyleProp<ViewStyle>;
containerStyle?: StyleProp<ViewStyle>;
};

type State = {
Expand Down Expand Up @@ -92,7 +92,7 @@ export default class SceneView<T extends Route> extends React.Component<
};

render() {
const { navigationState, index, layout, style } = this.props;
const { navigationState, index, layout, containerStyle } = this.props;
const { loading } = this.state;

const focused = navigationState.index === index;
Expand All @@ -110,7 +110,7 @@ export default class SceneView<T extends Route> extends React.Component<
: focused
? StyleSheet.absoluteFill
: null,
style,
containerStyle,
wael-zuaiter marked this conversation as resolved.
Show resolved Hide resolved
]}
>
{
Expand Down
2 changes: 1 addition & 1 deletion src/TabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function TabView<T extends Route>({
lazy={typeof lazy === 'function' ? lazy({ route }) : lazy}
lazyPreloadDistance={lazyPreloadDistance}
navigationState={navigationState}
style={sceneContainerStyle}
containerStyle={sceneContainerStyle}
>
{({ loading }) =>
loading
Expand Down