From 547612b28b6ea97cd710210ecbbe6917da0c9734 Mon Sep 17 00:00:00 2001 From: Konstantin Rakitine Date: Wed, 12 Nov 2025 16:23:11 -0500 Subject: [PATCH] Fix Form's bottom inset SafeArea for inline save button --- packages/components-native/src/Form/Form.tsx | 1 - .../src/Form/components/FormBody/FormBody.tsx | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/components-native/src/Form/Form.tsx b/packages/components-native/src/Form/Form.tsx index c2b7daad5e..32c9129436 100644 --- a/packages/components-native/src/Form/Form.tsx +++ b/packages/components-native/src/Form/Form.tsx @@ -174,7 +174,6 @@ function InternalForm({ ref={scrollViewRef} {...keyboardProps} extraHeight={headerHeight} - extraScrollHeight={edgeToEdgeEnabled ? tokens["space-large"] : 0} contentContainerStyle={ !keyboardHeight && styles.scrollContentContainer } diff --git a/packages/components-native/src/Form/components/FormBody/FormBody.tsx b/packages/components-native/src/Form/components/FormBody/FormBody.tsx index 6ab52ed840..f765528cbc 100644 --- a/packages/components-native/src/Form/components/FormBody/FormBody.tsx +++ b/packages/components-native/src/Form/components/FormBody/FormBody.tsx @@ -1,5 +1,6 @@ -import React, { useMemo } from "react"; +import React from "react"; import { View } from "react-native"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; import { useStyles } from "./FormBody.style"; import { useScreenInformation } from "../../hooks/useScreenInformation"; import type { FormActionBarProps } from "../FormActionBar"; @@ -25,13 +26,12 @@ export function FormBody({ setSaveButtonHeight, saveButtonOffset, }: FormBodyProps): JSX.Element { - const paddingBottom = useBottomPadding(); - const fullViewPadding = useMemo(() => ({ paddingBottom }), [paddingBottom]); + const { bottom: paddingBottom } = useSafeAreaInsets(); const styles = useStyles(); return ( <> - + {children} {shouldRenderActionBar && ( - {shouldRenderActionBar && !saveButtonOffset && ( + {!saveButtonOffset && ( )}