jacklein / rn-bottom-drawer

a react native bottom drawer component
MIT License
186 stars 84 forks source link

AnimatedValue: Attempting to set value to undefined #37

Closed jaaouani-glitch closed 4 years ago

jaaouani-glitch commented 4 years ago

Hi, I'm trying to use rn-bottom-drawer, but get error message as the title when I swipe up, the error produces on both platform android and iOS.

<BottomDrawer containerHeight={Dimensions.get('window').height / 2} offset={0} startUp={false} roundedEdges={true} shadow={true}>
                    <View style={{ flex: 1 }}>
                            <Text>Hi</Text>
                   </View>
</BottomDrawer>

my react native version is: 0.63.2 and latest rn-bottom-drawer.

Spark-NF commented 4 years ago

Same here (reproduced on Android, didn't try iOS). I "solved" it by retrograding react-native to 0.62.2.

EDIT: after a quick investigation, it's caused by the calls to this.position.setValue in Animator.js not passing the X value, which is then undefined, causing the error. I created the PR #38 to fix this.

jaaouani-glitch commented 4 years ago

Thank you, I follow you're solution amazing.

Billwall2020 commented 4 years ago

The solution is great and works perfectly, please merge it! 👍