'react native gifted chat can not hide Typing Indicator
i want to using Typing Indicator from Gifted Chat, here is my code to show typing state:
const [isTyping, setIsTyping] = useState(false)
const renderFooter = (props) => {
return <TypingIndicator isTyping={isTyping}/>
}
<GiftedChat>
....
renderFooter={renderFooter}
isTyping={isTyping}
onPressAvatar={() => {
console.log('longpressavt', isTyping)
setIsTyping(!isTyping)
}}
</GiftedChat>
i can show typing indicator in first avatar click, but next time click the Typing Indicator does not dismiss, can anyone guide me to know problem? Thanks
Solution 1:[1]
Try this: - shouldUpdateMessage={() => { return true; }}
I got it from this link - https://github.com/FaridSafi/react-native-gifted-chat/issues/2186
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | benny254 |