From 15fe4c4147163b2bb6f246f9a8a2605583bbc041 Mon Sep 17 00:00:00 2001 From: keplyx Date: Mon, 16 Sep 2019 18:53:58 +0200 Subject: [PATCH] Fixed planning modal impossible to close/scroll --- screens/PlanningScreen.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/screens/PlanningScreen.js b/screens/PlanningScreen.js index 9afd131..5308338 100644 --- a/screens/PlanningScreen.js +++ b/screens/PlanningScreen.js @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; -import {Content, H1, H2, H3, Text} from 'native-base'; +import {Content, H1, H2, H3, Text, Button} from 'native-base'; import i18n from "i18n-js"; import {View, Image} from "react-native"; import ThemeManager from "../utils/ThemeManager"; @@ -12,6 +12,7 @@ import HTML from 'react-native-render-html'; import Touchable from 'react-native-platform-touchable'; import Modalize from 'react-native-modalize'; import WebDataManager from "../utils/WebDataManager"; +import CustomMaterialIcon from "../components/CustomMaterialIcon"; type Props = { @@ -84,15 +85,29 @@ export default class PlanningScreen extends React.Component { return daysOfYear; } + getModalHeader() { + return ( + + + + ); + } + getModalContent() { return ( -

+

{this.state.modalCurrentDisplayItem.title}

{ modalStyle={{ backgroundColor: ThemeManager.getCurrentThemeVariables().containerBgColor, }} - adjustToContentHeight + // adjustToContentHeight // Breaks when displaying full screen, half, then full again + HeaderComponent={() => this.getModalHeader()} onClosed={() => this.onModalClosed()}> {this.getModalContent()}