You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If preload is true on an <Image> component, it will not update the image if the src attribute is updated. This is especially problematic if navigation is managed by a library like React Router, which will re-use existing components, but, as proven by a unit test, will happen anywhere that src is set by a property.
Example Code with non-updating Image tag (edited for brevity and clarity):
Bug Report
Prerequisites
For more information, see the
CONTRIBUTING
guide.Versions
2.1.17
Description
If
preload
istrue
on an<Image>
component, it will not update the image if thesrc
attribute is updated. This is especially problematic if navigation is managed by a library like React Router, which will re-use existing components, but, as proven by a unit test, will happen anywhere thatsrc
is set by a property.Example Code with non-updating Image tag (edited for brevity and clarity):
Steps to Reproduce
<Image>
component to a view which is rendered by React Routersrc
attribute using a dependency on a property.Expected behavior: [What you expected to happen]
When
src
is updated, the new image should load.Actual behavior: [What actually happened]
When
src
is updated, nothing happens.Environment details: [OS, Browser, ...]
Verified on Edge 111.0.1661.62, Chrome 112.0.5615.49.
Possible Solution
I will post a fix shortly.
The text was updated successfully, but these errors were encountered: