Skip to content

Commit

Permalink
feat: delete prop onInitialLayoutView (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuberquia2115 authored Aug 22, 2023
1 parent e6f5a81 commit e4fd6a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@
"pre-commit": "yarn lint:fix && yarn prettier && yarn tsc"
}
}
}
}
5 changes: 0 additions & 5 deletions src/GiftedChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
onPress?(context: any, message: TMessage): void
/* Callback when a message bubble is long-pressed; default is to show an ActionSheet with "Copy Text" (see example using showActionSheetWithOptions()) */
onLongPress?(context: any, message: TMessage): void
//function to get the layout of the first rendering
onInitialLayoutView?(event: LayoutChangeEvent): void
/*Custom Username container */
renderUsername?(user: User): React.ReactNode
/* Reverses display order of messages; default is true */
Expand Down Expand Up @@ -574,7 +572,6 @@ function GiftedChat<TMessage extends IMessage = IMessage>(
if (layout.height <= 0) {
return
}
props.onInitialLayoutView?.(e)
notifyInputTextReset()

maxHeightRef.current = layout.height
Expand All @@ -601,7 +598,6 @@ function GiftedChat<TMessage extends IMessage = IMessage>(
isFirstLayoutRef.current === true
) {
maxHeightRef.current = layout.height
props.onInitialLayoutView?.(e)
setState({
...state,
messagesContainerHeight:
Expand Down Expand Up @@ -740,7 +736,6 @@ GiftedChat.propTypes = {
renderBubble: PropTypes.func,
renderSystemMessage: PropTypes.func,
onLongPress: PropTypes.func,
onInitialLayoutView: PropTypes.func,
renderMessage: PropTypes.func,
renderMessageText: PropTypes.func,
renderMessageImage: PropTypes.func,
Expand Down

0 comments on commit e4fd6a4

Please sign in to comment.