We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
children
SlidingUpPanel
While running the app this warning is showing. How to fix this?
MapComponent.js const snappingPoints = [draggableRange.top,draggableRange.bottom]; const [panelPositionVal, setPanelPositionVal] = useState(new Animated.Value(draggableRange.bottom)); const [draggableRange, setDraggableRange] = useState({ top: hp('70%'), bottom: Platform.OS==='ios'?hp('30%'):deviceHeight/2.8 }); const [allowDragging, setAllowDragging] = useState(false); const onMomentumDragEnd = useCallback((value) => { if (value === draggableRange.bottom) { setTopSpacing(0); setSlideUpAtTop(false) } else { setTopSpacing(-300); setSlideUpAtTop(true) } }, [draggableRange]); [enter image description here][1] <SlidingUpPanel ref={c =>{ if (panelRef.current == null && c != null) { panelRef = c } } } height={draggableRange.top} animatedValue={panelPositionVal} draggableRange={draggableRange} snappingPoints={snappingPoints} backdropOpacity={0} showBackdrop={false} allowDragging={allowDragging} onMomentumDragEnd={onMomentumDragEnd}> <View style={{justifyContent: 'center',alignItems: 'center',bottom:-20}}> <View style={{height:20,justifyContent: 'center',alignItems: 'center',backgroundColor: 'white', marginTop: 2}}> ``` Home.js
<View style={styles.contentContainer}> <MapComponent /> </View> </SafeAreaView> --- ### Environment * Version: 2.4.5 * React Native version: 0.65.1 * Platform(s) (iOS, Android, or both?): Android * Device info (Simulator/Device? OS version? Debug/Release?): Simulator
The text was updated successfully, but these errors were encountered:
@AparnaManjalavil You are to pass a single ReactElement to the SlidingPanel
Sorry, something went wrong.
No branches or pull requests
Issue Description
While running the app this warning is showing. How to fix this?
Code Snippets
MapComponent.js
const snappingPoints = [draggableRange.top,draggableRange.bottom];
const [panelPositionVal, setPanelPositionVal] = useState(new Animated.Value(draggableRange.bottom));
const [draggableRange, setDraggableRange] = useState({
top: hp('70%'),
bottom: Platform.OS==='ios'?hp('30%'):deviceHeight/2.8
});
const [allowDragging, setAllowDragging] = useState(false);
const onMomentumDragEnd = useCallback((value) => {
if (value === draggableRange.bottom) {
setTopSpacing(0);
setSlideUpAtTop(false)
} else {
setTopSpacing(-300);
setSlideUpAtTop(true)
}
}, [draggableRange]);
[enter image description here][1]
<SlidingUpPanel
ref={c =>{
if (panelRef.current == null && c != null) {
panelRef = c
}
}
}
height={draggableRange.top}
animatedValue={panelPositionVal}
draggableRange={draggableRange}
snappingPoints={snappingPoints}
backdropOpacity={0}
showBackdrop={false}
allowDragging={allowDragging}
onMomentumDragEnd={onMomentumDragEnd}>
<View style={{justifyContent: 'center',alignItems: 'center',bottom:-20}}>
<View style={{height:20,justifyContent: 'center',alignItems: 'center',backgroundColor: 'white', marginTop: 2}}>
```
Home.js
The text was updated successfully, but these errors were encountered: