React-native-gifted-chat: How to send a view with Buttons on Gifted-Chat ?

Created on 27 May 2019  路  5Comments  路  Source: FaridSafi/react-native-gifted-chat

Issue Description

Hello guys,

how can i send a view with buttons something like this ?
for example: when i click the hand on the input, it will send a view with buttons !

GIThelp

Most helpful comment

It's very simple. Create a custom field on your message object, like "invitation". On rendercustomview method, check if currentmessage own invitation field, eg if(currentmessage.invitation). Otherwise, return null

All 5 comments

You鈥檝e to use renderCustomView

@xcarpentier now it render every-time i type something!
How can i manage that ?
I want when the user type and when it hit send now, to not render the CustomView that i made :/
Screenshot_1559234946

renderCustomView(currentMessage) you have to test your data in message when you want to display custom view from message meta.

@xcarpentier not sure i truly understand :/ , any example would be a great help .

It's very simple. Create a custom field on your message object, like "invitation". On rendercustomview method, check if currentmessage own invitation field, eg if(currentmessage.invitation). Otherwise, return null

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arayaryoma picture arayaryoma  路  3Comments

tafelito picture tafelito  路  3Comments

yazhengwang picture yazhengwang  路  3Comments

jasonwcfan picture jasonwcfan  路  3Comments

yogiben picture yogiben  路  3Comments