-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Feature Request] Make a Distinction Between Loading and Error States in Image Component #3640
Comments
I’ve encountered the same issue recently and I completely agree with you. |
@wingkwong Can you assign this issue to me. I would like to work on it. |
…for loding and error states
@Arian94 next time please ask for assignment first before implementation. |
@wingkwong Oh, wasn't used to that. From my experience, the quicker and better you do, the higher chances of success. |
I agree but you may at least leave a message saying you will be working on it. Otherwise I'll assume no one is working on it and assign to someone else. This would waste the effort and time for others. I'll check both PR to see which one suits better and close the other one. cc @abhinav700 |
Yeah, it happened so fast. |
Okay. |
@Arian94 Can you recreate the PR again? |
I'll try. |
Is your feature request related to a problem? Please describe.
When using the Image component, one would want to have two different images for the loading state as well as showing a fallback image when an error is encountered.
ATM, there is only one property called
fallbackSrc
that handles both states and displays one image, so there is no distinction between the loading and the error states.Describe the solution you'd like
Please, make it possible to display another image on the Error state by adding a new property and modifying the
use-image.ts
file to handle such case.Describe alternatives you've considered
Wrap the existing Image component and on the
onError
handler, set thefallbackSrc
to point to another source like:Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered: