-
-
Notifications
You must be signed in to change notification settings - Fork 453
feat(Avatar): improve image loading status handling and add crossOrigin prop #1838
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
Conversation
commit: |
|
Thanks @sadeghbarati !! Can you check the failing test? 😁 |
packages/core/src/Avatar/utils.ts
Outdated
| image.referrerPolicy = referrer | ||
| } | ||
| } | ||
| watch([() => src.value, () => referrerPolicy?.value, () => crossOrigin?.value], ([src, referrerPolicy], _, onCleanup) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onCleanup in watch is 3.5+ feature, I believe this might not a feasible solution for earlier version. Perhaps use watchEffect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Zernonia 👋
Right, will change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Could you please update the tests 😄 |
|
No worry @sadeghbarati ! I can help with fixing the failed test. We might need to mock |

from radix-ui