Allow register and create group page to be scrollable when onscreen keyboard is open

This commit is contained in:
Keannu Bernasol 2023-10-27 21:16:43 +08:00
parent 3891f12f5d
commit bd42b5418e
3 changed files with 6 additions and 3 deletions

View file

@ -24,6 +24,7 @@ import MapView, { UrlTile, Marker } from "react-native-maps";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import { useToast } from "react-native-toast-notifications"; import { useToast } from "react-native-toast-notifications";
import CaretLeftIcon from "../../icons/CaretLeftIcon/CaretLeftIcon"; import CaretLeftIcon from "../../icons/CaretLeftIcon/CaretLeftIcon";
import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer";
export default function CreateGroup({ route }: any) { export default function CreateGroup({ route }: any) {
const { location, subject } = route.params; const { location, subject } = route.params;
@ -100,7 +101,7 @@ export default function CreateGroup({ route }: any) {
if (location) { if (location) {
return ( return (
<View style={styles.background}> <View style={styles.background}>
<AnimatedContainerNoScroll> <AnimatedContainer>
<View style={{ zIndex: -1 }}> <View style={{ zIndex: -1 }}>
<View style={styles.padding} /> <View style={styles.padding} />
<View style={{ borderRadius: 16, overflow: "hidden" }}> <View style={{ borderRadius: 16, overflow: "hidden" }}>
@ -183,7 +184,7 @@ export default function CreateGroup({ route }: any) {
</View> </View>
<View style={styles.padding} /> <View style={styles.padding} />
</AnimatedContainerNoScroll> </AnimatedContainer>
</View> </View>
); );
} }

View file

@ -17,6 +17,7 @@ import { UserRegister } from "../../components/Api/Api";
import IsNumber from "../../components/IsNumber/IsNumber"; import IsNumber from "../../components/IsNumber/IsNumber";
import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer";
import { useToast } from "react-native-toast-notifications"; import { useToast } from "react-native-toast-notifications";
import { ScrollView } from "react-native-gesture-handler";
export default function Register() { export default function Register() {
const navigation = useNavigation<RootDrawerParamList>(); const navigation = useNavigation<RootDrawerParamList>();

View file

@ -44,8 +44,9 @@ const styles = StyleSheet.create({
justifyContent: "center", justifyContent: "center",
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
flex: 1, flexGrow: 1,
paddingHorizontal: 4, paddingHorizontal: 4,
paddingVertical: 32,
}, },
flex_row: { flex_row: {
display: "flex", display: "flex",