Comments (9)
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();
}
from react-native-swipe-up-down.
This is still an issue, does the author ever plan on fixing this?
from react-native-swipe-up-down.
Found the solution. In index.js
, set the line beginning with this.customStyle.style.top
equal to 0 in both the call to showFull()
and showMini()
.
this.customStyle.style.top = 0;
from react-native-swipe-up-down.
@hazeeb Did you try solution of @crock ?
from react-native-swipe-up-down.
@hazeeb Check after removing this line in onPanResponderMove method.
!this.state.collapsed && this.setState({ collapsed: true });
from react-native-swipe-up-down.
@nitinkumar24 It's not working. Any other solution for this
from react-native-swipe-up-down.
@minhchienwikipedia I tried @crock solution. No luck. Still having same issue
from react-native-swipe-up-down.
@hazeeb did you try swipeHeight={100} ? this worked for me.
from react-native-swipe-up-down.
I think that the MARGIN_TOP
constant on the top of the file on src/index
is the source of this problem. My suggestion is to subtract it from DEVICE_HEIGHT
on the showMini()
method.
showMini() {
const { onShowMini, itemMini } = this.props;
this.customStyle.style.top = itemMini
? DEVICE_HEIGHT - this.SWIPE_HEIGHT - MARGIN_TOP // avoid hiding on swipe down
: DEVICE_HEIGHT;
this.customStyle.style.height = itemMini ? this.SWIPE_HEIGHT : 0;
this.swipeIconRef && this.swipeIconRef.setState({ showIcon: true });
this.updateNativeProps();
!this.state.collapsed && this.setState({ collapsed: true });
this.checkCollapsed = true;
onShowMini && onShowMini();
}
from react-native-swipe-up-down.
Related Issues (20)
- @DavitVosk it worked well when i added your condition except on Samsung Note 8 and when I inspected it always return true. plz help HOT 1
- ScrollView into SwipeUpDown HOT 5
- How to close the this component? HOT 4
- Change swipe icon color HOT 4
- Move Up Move Down HOT 1
- TextInput inside the SwipeUpDown doesn't get focus HOT 3
- alignment issue on itemMini HOT 1
- Button inside itemFull can't be touched HOT 4
- 'showMini' function wasn't available HOT 2
- How to limit the height when its shows itemfull? HOT 4
- Default behaviour of the swipe up down component
- would like to request for typescript HOT 1
- Unexpected token, expected ";" (18: 5) HOT 1
- TouchableOpacity in itemFull props has no response HOT 3
- Prop ref does not exist in this component HOT 2
- ScrollView is not work HOT 5
- Unable to resolve dependency tree HOT 2
- color backdrop
- Not working in landscape device orientation
- Slide down lags
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-swipe-up-down.