itemFull component gets hidden on swipe-down
See original GitHub issueThis is my code
<SwipeUpDown
swipeHeight={20}
hasRef={ref => (this.swipeUpDownRef = ref)}
itemFull={<Destination />}
disablePressToShow={false}
style={{ zIndex: 10, backgroundColor: '#a3a3a3'' }}
animation="easeInEaseOut"
/>
Step 1: Swipe Up
When i try to swipe down, the content/component gets hidden and displays only the background color.
What I’m trying to achieve ? Component shouldn’t hide on swipe down.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:9
Top Results From Across the Web
React Native - Swipe to hide and show new content
import React, {Component} from 'react'; import { ScrollView, Text, View, Image, Button } from 'react-native'; import GestureRecognizer, { ...
Read more >React Native Swipe Up Down Component - Morioh
React Native Swipe Up Down. This module support iOS & Android. Demo. When hidden component. Getting started. $ npm install react-native-swipe-up-down --save.
Read more >react-native-swipe-up-down - npm
If you want hidden component just don't pass props itemMini . ... help you show component when hidden component <SwipeUpDown itemFull={<Test ...
Read more >Swipeable | React Native Gesture Handler - Software Mansion
This component allows for implementing swipeable rows or similar interaction. ... method that is called when left action panel gets open.
Read more >react-native-swipe-up-down - npm package - Snyk
Swipe Up Down component For more information about how to use this ... The npm package react-native-swipe-up-down receives a total of 335 downloads...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just add this line in showMini function. this.SWIPE_HEIGHT = 150; // Avoid hiding when swiping down.
showMini() { const { onShowMini, itemMini } = this.props; this.SWIPE_HEIGHT = 150; // Avoid hiding when swiping down. this.customStyle.style.top = itemMini ? DEVICE_HEIGHT - this.SWIPE_HEIGHT : DEVICE_HEIGHT; this.customStyle.style.height = itemMini ? this.SWIPE_HEIGHT : 0; this.swipeIconRef && this.swipeIconRef.setState({ showIcon: false }); this.updateNativeProps(); !this.state.collapsed && this.setState({ collapsed: true }); this.checkCollapsed = true; onShowMini && onShowMini(); }
I think that the
MARGIN_TOP
constant on the top of the file onsrc/index
is the source of this problem. My suggestion is to subtract it fromDEVICE_HEIGHT
on theshowMini()
method.