Avatar - Expose onError #5142
dylan-westbury
started this conversation in
Feature request
Replies: 1 comment
-
Hi @dylan-westbury, Thank you for reporting. We will look into this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Currently for the Avatar component, it is consuming the React Native Image onError method, which prevents an application handling an image loading error.
https://github.com/GeekyAnts/NativeBase/blob/master/src/components/composites/Avatar/Avatar.tsx
Problem Statement
An application may want to handle an error when an image has an error, for example when a presigned url expires the image may stop showing. An application may want to regenerate the url as it has expired to continue showing an image.
Proposed Solution or API
Create method
onImageError
and continue with same functionality of setState, while calling new Avatar prop onErrorAlternatives
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions