FaridSafi / react-native-gifted-chat

💬 The most complete chat UI for React Native

Home Page:https://gifted.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Popover when clicking on Avatar

12tp12 opened this issue · comments

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

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!