Fix visibility of the mentions autocomplete in the composer (#326) (#329)

* Improve layout in composer to ensure the mentions autocomplete is visible (closes #326)

* Dont dismiss the keyboard in the composer
This commit is contained in:
Paul Frazee 2023-03-20 16:10:29 -05:00 committed by GitHub
parent df6a712834
commit 8a3601c07c
3 changed files with 67 additions and 50 deletions

View file

@ -3,6 +3,7 @@ import {
NativeSyntheticEvent,
StyleSheet,
TextInputSelectionChangeEventData,
View,
} from 'react-native'
import PasteInput, {
PastedFile,
@ -185,7 +186,7 @@ export const TextInput = React.forwardRef(
}, [text, pal.link, pal.text])
return (
<>
<View style={styles.container}>
<PasteInput
testID="composerTextInput"
ref={textInput}
@ -202,15 +203,20 @@ export const TextInput = React.forwardRef(
view={autocompleteView}
onSelect={onSelectAutocompleteItem}
/>
</>
</View>
)
},
)
const styles = StyleSheet.create({
container: {
width: '100%',
},
textInput: {
flex: 1,
minHeight: 80,
padding: 5,
paddingBottom: 20,
marginLeft: 8,
alignSelf: 'flex-start',
},