Skip to content

Commit

Permalink
fix: pass onLayout if using adjustToContentHeight props
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremybarbet committed Mar 27, 2020
1 parent 00d438e commit 9b52c0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ export class Modalize<FlatListItem = any, SectionListItem = any> extends React.C
alwaysOpen,
panGestureEnabled,
avoidKeyboardLikeIOS,
adjustToContentHeight,
} = this.props;
const { isVisible, lastSnap, showContent } = this.state;
const pointerEvents = alwaysOpen ? 'box-none' : 'auto';
Expand All @@ -748,7 +749,7 @@ export class Modalize<FlatListItem = any, SectionListItem = any> extends React.C
style: [s.modalize__content, this.modalizeContent, modalStyle],
};

if (!avoidKeyboardLikeIOS) {
if (!avoidKeyboardLikeIOS && !adjustToContentHeight) {
keyboardAvoidingViewProps.onLayout = this.onModalizeContentLayout;
}

Expand Down

0 comments on commit 9b52c0e

Please sign in to comment.