react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[v2] Black sideMenu on iOS with custom width

Open densjac opened this issue 8 years ago • 7 comments

Issue Description

If you customize the SideMenu width and then try to close it from within the SideMenu Screen it leaves a black screen. I tried this in my project and in the Playground project and in both of them failed to execute correctly.

Steps to Reproduce / Code Snippets / Screenshots

  1. Add custom options for the width of the SideMenu
  2. Try to close it from within the SideMenu Screen
class SideMenuScreen extends Component {
  static options(passProps) {
    return {
      sideMenu: {
	left: {
	  width: 210
	}
      }
    };
  }

  render() {
    const testID = this.props.side === 'left' ? testIDs.HIDE_LEFT_SIDE_MENU_BUTTON : testIDs.HIDE_RIGHT_SIDE_MENU_BUTTON;
    return (
      <View style={styles.root} testID={this.props.testID}>
        <Text testID={testIDs.SIDE_BAR}>Side Bar</Text>
        <Text style={styles.h1}>{`This is a ${this.props.side} side menu screen`}</Text>
        <Button title='Hide Side Menu' testID={testID} onPress={() => this.hideSideMenu()} />
        <Button title='Push' testID={this.props.side + testIDs.SIDE_MENU_PUSH_BUTTON} onPress={() => this.pushAndCloseSideMenu()} />
      </View>
    );
  }

  hideSideMenu() {
    Navigation.mergeOptions(this.props.componentId, {
      sideMenu: {
        [this.props.side]: {
          visible: false
        }
      }
    });
  }

  pushAndCloseSideMenu() {
    this.hideSideMenu();
    Navigation.push('tab1Stack', {
      component: {
        name: 'navigation.playground.TextScreen'
      }
    });
  }
}

simulator screen shot - iphone 8 plus - 2018-09-12 at 11 49 54


Environment

  • React Native Navigation version: 2.0.2538
  • React Native version: 0.56.1
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator: iPhone 6 - 11.4, iPhone 8 Plus 11.4

densjac avatar Sep 12 '18 15:09 densjac

This looks to be the same issue https://github.com/wix/react-native-navigation/issues/3924

Unfortunately no fix yet

cvongrim avatar Sep 19 '18 18:09 cvongrim

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

stale[bot] avatar Nov 03 '18 18:11 stale[bot]

The issue has been closed for inactivity.

stale[bot] avatar Nov 26 '18 17:11 stale[bot]

@densjac I answer the question in here, check if it fits your case. https://github.com/wix/react-native-navigation/issues/3924#issuecomment-485317139

AKACC avatar Apr 22 '19 03:04 AKACC

@densjac did you solve that issue because i am also facing this issue with custom width of sidemenu @cvongrim @AKACC @labria @benhiller Do you have any solution for this problem.

"Navigation.js" Navigation.setRoot({

root: { sideMenu: { left: { visible:true, component: { id: "sideDrawer", name: "SideMenu",

    },
  },
  center: {
    stack: {
      id:'CENTER_STACK',
      children: [{
        component: {
          name:"NewCard",
        },
      
      }]
    },
   
  },
  options: {
    sideMenu: {
      left: {
        width:310
      },
    }
  }
 
  
}

}

Screenshot 2019-05-02 at 9 59 37 AM

rishabhSmartdata avatar May 02 '19 04:05 rishabhSmartdata

@rishabhSmartdata updating to the latest version of RRN may helps

AKACC avatar May 02 '19 13:05 AKACC

@AKACC I am already using "react-native-navigation": "^2.1.3", version

rishabhSmartdata avatar May 02 '19 13:05 rishabhSmartdata