React-native-snap-carousel: ParallaxImage cannot change property: 'resizeMode'

Created on 15 Sep 2017  路  4Comments  路  Source: meliorence/react-native-snap-carousel

I want to change 'resizeMode' of ParallaxImage but I can not.
After set style={{resizeMode: 'contain'}} does not working for me.
source={{ uri: item.thumbnails.medium.url}}
containerStyle={[Styles.imageContainer]}
style={{resizeMode : 'contain'}}
showSpinner={true}
{...parallaxProps}
/>
How can I change it? Please help me?

Most helpful comment

@SnowDang The fix is available in version 3.2.2 ;-)

All 4 comments

Hi @SnowDang,

If you take a look at this line of code, you'll see that component's style take precedence over yours. I did that in order to prevent potential mistakes, particularly setting the position to something other than relative (which would completely mess with the parallax effect).

I will shortly push a fix that will allow you to pass your custom styles.

And here you are!

If you want to use this commit right away, you can modify your package.json file this way:

"react-native-snap-carousel": "https://github.com/archriss/react-native-snap-carousel#b4b3104

Can you confirm that it works as expected?

Thank @bd-arc very much.
I can modify it with your way.

@SnowDang The fix is available in version 3.2.2 ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wkwyatt picture wkwyatt  路  4Comments

naffiq picture naffiq  路  5Comments

duongkhoilinh picture duongkhoilinh  路  4Comments

Dr1992 picture Dr1992  路  4Comments

codejet picture codejet  路  5Comments