react-native-image-viewer icon indicating copy to clipboard operation
react-native-image-viewer copied to clipboard

'renderImage' is not called if the url is an empty string

Open viniciusfont opened this issue 5 years ago • 1 comments

renderImage is not called when setting an empty url on the imageUrls element property. The url is fetched async inside the ImageMessage custom component The props is never printed on the console

const images = messages
  .filter(message => message.type === 'image')
  .map(message => {
    return {
      props: {
        message: message,
      },
    };
});
renderImage={props => {
  console.log('props', props);
  const {message} = props;
  return <ImageMessage message={message} />;
}}

viniciusfont avatar May 26 '20 17:05 viniciusfont

The library uses the url for calculate the 'height' and the 'width' of the child component. How can I change the image size async?

viniciusfont avatar May 26 '20 20:05 viniciusfont