Reverts changes to app-modal and changes input window for notes on iOS

This commit is contained in:
tina
2024-10-01 21:24:30 +02:00
parent 4de32e3801
commit f4fa2a7c57
2 changed files with 19 additions and 27 deletions
+13 -4
View File
@@ -1,6 +1,12 @@
import React, { useState } from 'react'
import PropTypes from 'prop-types'
import { ScrollView, StyleSheet, View } from 'react-native'
import {
Dimensions,
Platform,
ScrollView,
StyleSheet,
View,
} from 'react-native'
import AppModal from '../common/app-modal'
import AppSwitch from '../common/app-switch'
@@ -111,9 +117,12 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
const noteText = symptom === 'note' ? data.value : data.note
const inputProps = {
multiline: true,
numberOfLines: 4,
numberOfLines: Platform.OS === 'ios' ? null : 4, // only Android
minHeight: Platform.OS === 'ios' ? styles.input.height : null,
maxHeight:
Platform.OS === 'ios' ? Dimensions.get('window').height * 0.4 : null,
style: symptom === 'note' ? null : styles.input, // overwrites previous 2 lines to fix note space in symptoms
scrollEnabled: true,
style: styles.input,
textAlignVertical: 'top',
}
@@ -185,7 +194,7 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
<Segment style={styles.segmentBorder}>
<AppText>{symtomPage[symptom].note}</AppText>
<AppTextInput
multiline={true}
{...inputProps}
onChangeText={onEditNote}
placeholder={sharedLabels.enter}
testID="noteInput"