Skip to content

Commit

Permalink
fix: Tab view height auto expand \n\n Resolves: satya164#1178
Browse files Browse the repository at this point in the history
  • Loading branch information
wael-zuaiter committed Jun 27, 2021
1 parent dad1e49 commit 383d1b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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,
]}
>
{
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

0 comments on commit 383d1b4

Please sign in to comment.