From a9bdbe2ca61436f8b31f78f04925274a004a4662 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Fri, 8 Nov 2024 10:36:36 +0100 Subject: [PATCH] Remove extra padding above the button on ios --- src/components/SelectionList/BaseSelectionList.tsx | 3 ++- src/components/SelectionList/types.ts | 3 +++ .../workspace/companyCards/assignCard/CardSelectionStep.tsx | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/SelectionList/BaseSelectionList.tsx b/src/components/SelectionList/BaseSelectionList.tsx index 03cd5028ecb2..82a2ae4b3c14 100644 --- a/src/components/SelectionList/BaseSelectionList.tsx +++ b/src/components/SelectionList/BaseSelectionList.tsx @@ -90,6 +90,7 @@ function BaseSelectionList( sectionTitleStyles, textInputAutoFocus = true, shouldShowTextInputAfterHeader = false, + includeSafeAreaPaddingBottom = true, shouldTextInputInterceptSwipe = false, listHeaderContent, onEndReached = () => {}, @@ -719,7 +720,7 @@ function BaseSelectionList( return ( {({safeAreaPaddingBottomStyle}) => ( - + {shouldShowTextInput && !shouldShowTextInputAfterHeader && renderInput()} {/* If we are loading new options we will avoid showing any header message. This is mostly because one of the header messages says there are no options. */} {/* This is misleading because we might be in the process of loading fresh options from the server. */} diff --git a/src/components/SelectionList/types.ts b/src/components/SelectionList/types.ts index eba6cf274d6b..d7016b9306fc 100644 --- a/src/components/SelectionList/types.ts +++ b/src/components/SelectionList/types.ts @@ -446,6 +446,9 @@ type BaseSelectionListProps = Partial & { /** Whether the text input should be shown after list header */ shouldShowTextInputAfterHeader?: boolean; + /** Whether to include padding bottom */ + includeSafeAreaPaddingBottom?: boolean; + /** Callback to fire when the list is scrolled */ onScroll?: (event: NativeSyntheticEvent) => void; diff --git a/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx b/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx index 303b5c644489..12440bd58f5d 100644 --- a/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx +++ b/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx @@ -178,6 +178,7 @@ function CardSelectionStep({feed, policyID}: CardSelectionStepProps) { } shouldShowTextInputAfterHeader + includeSafeAreaPaddingBottom={false} shouldShowListEmptyContent={false} shouldUpdateFocusedIndex />