We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
[email protected]
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-gifted-chat/lib/GiftedChat.d.ts b/node_modules/react-native-gifted-chat/lib/GiftedChat.d.ts index eb9b7de..d4e10bb 100644 --- a/node_modules/react-native-gifted-chat/lib/GiftedChat.d.ts +++ b/node_modules/react-native-gifted-chat/lib/GiftedChat.d.ts @@ -20,7 +20,7 @@ import { Send, SendProps } from './Send'; import { SystemMessage, SystemMessageProps } from './SystemMessage'; import { Time, TimeProps } from './Time'; import * as utils from './utils'; -export interface GiftedChatProps<TMessage extends IMessage = IMessage> { +export interface GiftedChatProps<TMessage extends IMessage = IMessage> extends Partial<MessageContainer<TMessage>> { messageContainerRef?: React.RefObject<FlatList<IMessage>>; textInputRef?: React.RefObject<TextInput>; messages?: TMessage[]; diff --git a/node_modules/react-native-gifted-chat/lib/MessageContainer.js b/node_modules/react-native-gifted-chat/lib/MessageContainer.js index b577850..6394e04 100644 --- a/node_modules/react-native-gifted-chat/lib/MessageContainer.js +++ b/node_modules/react-native-gifted-chat/lib/MessageContainer.js @@ -55,6 +55,8 @@ class MessageContainer extends React.PureComponent { hasScrolled: false, }; this.renderTypingIndicator = () => { + if (this.props.renderTypingIndicator) + return this.props.renderTypingIndicator(); return <TypingIndicator isTyping={this.props.isTyping || false}/>; }; this.renderFooter = () => { @@ -81,6 +83,8 @@ class MessageContainer extends React.PureComponent { this.props.forwardRef.current.scrollToEnd({ animated }); }; this.handleOnScroll = (event) => { + if (this.props.handleOnScroll) + this.props.handleOnScroll(event); const { nativeEvent: { contentOffset: { y: contentOffsetY }, contentSize: { height: contentSizeHeight }, layoutMeasurement: { height: layoutMeasurementHeight }, }, } = event; const { scrollToBottomOffset } = this.props; if (this.props.inverted)
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: