Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover when clicking on Avatar #660

Closed
12tp12 opened this issue Dec 11, 2017 · 6 comments
Closed

Popover when clicking on Avatar #660

12tp12 opened this issue Dec 11, 2017 · 6 comments

Comments

@12tp12
Copy link

12tp12 commented Dec 11, 2017

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
@mafiusu
Copy link

mafiusu commented Dec 11, 2017

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

@12tp12
Copy link
Author

12tp12 commented Dec 11, 2017

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!

@LMestre14
Copy link

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

@xcarpentier
Copy link
Collaborator

@12tp12 Yes you should use renderAvatar...

@12tp12
Copy link
Author

12tp12 commented Dec 22, 2017

Thanks everyone!

@xcarpentier
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants