React-native-gifted-chat: Popover when clicking on Avatar

Created on 11 Dec 2017  路  6Comments  路  Source: FaridSafi/react-native-gifted-chat

Issue Description

I want to implement a popover that pops right after clicking on a specific avatar,
what is the best implementation in this case and how? using renderAvatar props?

Thanks

  • React Native version: last version
  • react-native-gifted-chat version: last version
  • Platform(s) (iOS, Android, or both?): both
waiting-response

Most helpful comment

You could use the onPressAvatar prop in the GiftedChat Component. I would simply show a Modal.

All 6 comments

You could use the onPressAvatar prop in the GiftedChat Component. I would simply show a Modal.

I thought about it, but if i want to show the modal next to the avatar?
the onPressAvatar function returns 'user', without X,Y coordinates of the pressed avatar.

Thanks!

Why not render your own avatar? The component has a renderAvatar function option where you render your avatar.
You could use that and render an avatar with a touchableOpacity, and if touched render something above it

@12tp12 Yes you should use renderAvatar...

Thanks everyone!

I close your issue, but I create a question pointing here: https://github.com/FaridSafi/react-native-gifted-chat/blob/master/README.md#questions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hayko1994 picture Hayko1994  路  3Comments

maharjanaman picture maharjanaman  路  3Comments

emilkarl picture emilkarl  路  3Comments

tafelito picture tafelito  路  3Comments

luisar picture luisar  路  3Comments