diff --git a/examples/Basic/Basic.js b/examples/Basic/Basic.js index c13670a..a8e84f1 100644 --- a/examples/Basic/Basic.js +++ b/examples/Basic/Basic.js @@ -63,6 +63,7 @@ module.exports = class Basic extends Component { isOpen: false, selectedItem: 'About', }; + skippedElements = []; toggle() { this.setState({ @@ -88,7 +89,8 @@ module.exports = class Basic extends Component { this.updateMenuState(isOpen)}> + onChange={(isOpen) => this.updateMenuState(isOpen)} + ref={(ref)=> {if (ref !== null) ref.skippedElements = this.skippedElements;}}> Welcome to React Native! @@ -103,6 +105,14 @@ module.exports = class Basic extends Component { Current selected menu item is: {this.state.selectedItem} + { if (ref && this.skippedElements && this.skippedElements.indexOf(ref._reactInternalInstance._rootNodeID) == -1) this.skippedElements.push(ref._reactInternalInstance._rootNodeID);}} + style={[styles.instructions, {borderWidth: 1, marginTop: 30}]}> + And this is an example of element (TEXT element to be honest), which + will not respond to any swipes to show the menu back. It should, because + `props.edgeHitWidth` is set to `deviceScreen.width`, but it won't :) Sometimes + it may be really usefull, for example, in horizontal scroll views. +