From 5cd55cada6fec8854ec04b93fb3c3a64fe76c58f Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 7 Dec 2017 21:23:41 +0000 Subject: [PATCH] Mobile: Made context menu scrollable --- ReactNativeClient/lib/components/screen-header.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ReactNativeClient/lib/components/screen-header.js b/ReactNativeClient/lib/components/screen-header.js index 448c3672e..f746b376b 100644 --- a/ReactNativeClient/lib/components/screen-header.js +++ b/ReactNativeClient/lib/components/screen-header.js @@ -1,6 +1,6 @@ const React = require('react'); const Component = React.Component; const { connect } = require('react-redux'); -const { Platform, View, Text, Button, StyleSheet, TouchableOpacity, Image } = require('react-native'); +const { Platform, View, Text, Button, StyleSheet, TouchableOpacity, Image, ScrollView, Dimensions } = require('react-native'); const Icon = require('react-native-vector-icons/Ionicons').default; const { Log } = require('lib/log.js'); const { BackButtonService } = require('lib/services/back-button.js'); @@ -410,6 +410,7 @@ class ScreenHeaderComponent extends Component { const backButtonComp = backButton(this.styles(), () => this.backButton_press(), !this.props.historyCanGoBack); const searchButtonComp = this.props.noteSelectionEnabled ? null : searchButton(this.styles(), () => this.searchButton_press()); const deleteButtonComp = this.props.noteSelectionEnabled ? deleteButton(this.styles(), () => this.deleteButton_press()) : null; + const windowHeight = Dimensions.get('window').height - 50; const menuComp = ( this.menu_select(value)} style={this.styles().contextMenu}> @@ -417,7 +418,9 @@ class ScreenHeaderComponent extends Component { - { menuOptionComponents } + + { menuOptionComponents } + );