Hi there and thanks for this amazing component... I have a question: can I add some "special messages" for the user to take some action in the app, like navigate to a specific screen or pop up a modal or similar?
Thank you.
The documentation mentions those three props :
renderMessage (Function) - Custom message container
renderMessageText (Function) - Custom message text
renderMessageImage (Function) - Custom message image
The first one fits your needs as it can return some TouchableOpacity container that, onPress, trigger whatever action you'd like
I thing props renderCustomView is easier for this aim. If you want show your message in same bubble as other messages.
But if you want show specific view see MehdiAlouafi solution
I'll check both solutions ! Thanks...
@leonel-lordford any news?
Feel free to re-open if you need more informations.
Hi there, I feel like my issue has something to do with that.
I'm working on a chatbot and sometimes the chatbot response comes with a file or custom text. My question is, how can I show a customView after a bubble in a conversation?
Example:
Person: What about my payment?
Chatbot: Here is some information for you:
Chatbot: (image or file in another bubble)
I tried to put renderMessageText param inside message object but didn't work.
Thanks for your time friends!
https://snack.expo.io/@xcarpentier/gifted-chat <- here you can see example of renderCustomView
Works fine!! Thank you!
Most helpful comment
https://snack.expo.io/@xcarpentier/gifted-chat <- here you can see example of renderCustomView