Code Monkey home page Code Monkey logo

Comments (9)

sunilmishra avatar sunilmishra commented on July 19, 2024 5

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.

crock avatar crock commented on July 19, 2024

This is still an issue, does the author ever plan on fixing this?

from react-native-swipe-up-down.

crock avatar crock commented on July 19, 2024

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.

minhchienwikipedia avatar minhchienwikipedia commented on July 19, 2024

@hazeeb Did you try solution of @crock ?

from react-native-swipe-up-down.

nitinkumar24 avatar nitinkumar24 commented on July 19, 2024

@hazeeb Check after removing this line in onPanResponderMove method.
!this.state.collapsed && this.setState({ collapsed: true });

from react-native-swipe-up-down.

Geeta21Khati avatar Geeta21Khati commented on July 19, 2024

@nitinkumar24 It's not working. Any other solution for this

from react-native-swipe-up-down.

Geeta21Khati avatar Geeta21Khati commented on July 19, 2024

@minhchienwikipedia I tried @crock solution. No luck. Still having same issue

from react-native-swipe-up-down.

IsharaHansaka avatar IsharaHansaka commented on July 19, 2024

@hazeeb did you try swipeHeight={100} ? this worked for me.

from react-native-swipe-up-down.

imdhemy avatar imdhemy commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.