Code Monkey home page Code Monkey logo

Comments (6)

Kureev avatar Kureev commented on July 22, 2024

We have disableGestures for that. Check out readme

from react-native-side-menu.

grabbou avatar grabbou commented on July 22, 2024

AFAIK this is for disabling slide to open gestures? Anyway, I've managed to sort that out differently.

from react-native-side-menu.

grabbou avatar grabbou commented on July 22, 2024

BTW - are there any plans to make this menu props driven? I'd like to manage isOpen with Flux (and don't use refs.menu as I need to use it earlier than its set) and the following mods are nearly making it possible:

class MyMenu extends SideMenu {
  constructor(props) {
    super(props);
    this.isOpen = this.props.isOpen || false;
  }

  componentWillReceiveProps(props) {
    super.componentWillReceiveProps(props);
    if (this.props.isOpen !== props.isOpen) {
      this.toggleMenu();
    }
  }
}

The only exception is it does not respect initial state - when isOpen equals to true. I think the solution is to call updatePosition in constructor when isOpen is true?

This is because the navbar of my view has a menu button that toggles menu (which should be clickable also when menu is open). The rest of the view should be disabled, so I decided to make a simple component DisabledView that sets pointerEvents to none only if given prop isDisabled equals to true (which is taken from Flux store based on actions I pass). Gives you ability to disable actually what you want based on menu position.

from react-native-side-menu.

Kureev avatar Kureev commented on July 22, 2024

I like this idea, that's definitely a step forward. But before implementing new functionality we need to fix existing bugs...

from react-native-side-menu.

grabbou avatar grabbou commented on July 22, 2024

If there are some bits where I can help that would be awesome. We highly depend on your component in few of my projects at company as well as in @este community.

from react-native-side-menu.

Kureev avatar Kureev commented on July 22, 2024

@grabbou There are 2 issues I really want to solve asap:

After that I think we can try to consider the way to improve component

from react-native-side-menu.

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.