react native gifted chat can not hide Typing Indicator

890 views Asked by At

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

1

There are 1 answers

0
benny254 On BEST ANSWER

Try this: - shouldUpdateMessage={() => { return true; }}

I got it from this link - https://github.com/FaridSafi/react-native-gifted-chat/issues/2186