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
I've been trying to tweak the code so that when a new image src is received, isNoImage is reset to false, before img onError determines its value for the new img src.
I know virtually nothing about Flow, and had assumed I could use React lifecycles to achieve this, but alas, I haven't managed to get it working, either with componentWillReceiveProps or the replacement for it, getDerivedStateFromProps. I'm guessing Flow doesn't respond to lifecycle methods.
Any hints on how to update state on receiving a new url value?
An example of the use case: https://novelroasters.com/gear/able-brewing-aeropress-filter
Selecting (from the drop down) 'Fine' and 'Standard' update my images accordingly. However 'TwinPack' currently has no image associated with it, and so the default noImage url is shown. I would like to be able to click back on a different select option again (Fine/Standard) and have the image update.
Cheers,
Al
The text was updated successfully, but these errors were encountered:
FWIW, the image does update in the code, even if it doesn't display, it's just that isNoImage remains 'True' and so the default image is the one that displays. Using React Tools I can uncheck the box and see that everything else is working perfectly. It's just updating isNoImage that I'm after.
Hi, thanks for this library.
I've been trying to tweak the code so that when a new image src is received, isNoImage is reset to false, before img onError determines its value for the new img src.
I know virtually nothing about Flow, and had assumed I could use React lifecycles to achieve this, but alas, I haven't managed to get it working, either with componentWillReceiveProps or the replacement for it, getDerivedStateFromProps. I'm guessing Flow doesn't respond to lifecycle methods.
Any hints on how to update state on receiving a new url value?
An example of the use case: https://novelroasters.com/gear/able-brewing-aeropress-filter
Selecting (from the drop down) 'Fine' and 'Standard' update my images accordingly. However 'TwinPack' currently has no image associated with it, and so the default noImage url is shown. I would like to be able to click back on a different select option again (Fine/Standard) and have the image update.
Cheers,
Al
The text was updated successfully, but these errors were encountered: