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

Comments

Projects
None yet
4 participants
@12tp12

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

This comment has been minimized.

Show comment
Hide comment
@mafiusu

mafiusu Dec 11, 2017

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

mafiusu commented Dec 11, 2017

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

@12tp12

This comment has been minimized.

Show comment
Hide comment
@12tp12

12tp12 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!

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

This comment has been minimized.

Show comment
Hide comment
@LMestre14

LMestre14 Dec 21, 2017

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

LMestre14 commented Dec 21, 2017

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

This comment has been minimized.

Show comment
Hide comment
@xcarpentier

xcarpentier Dec 21, 2017

Collaborator

@12tp12 Yes you should use renderAvatar...

Collaborator

xcarpentier commented Dec 21, 2017

@12tp12 Yes you should use renderAvatar...

@12tp12

This comment has been minimized.

Show comment
Hide comment
@12tp12

12tp12 Dec 22, 2017

Thanks everyone!

12tp12 commented Dec 22, 2017

Thanks everyone!

@xcarpentier

This comment has been minimized.

Show comment
Hide comment
@xcarpentier

xcarpentier Dec 22, 2017

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

Collaborator

xcarpentier commented Dec 22, 2017

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