From f9aa9d2e91ba0b862635dc3a00af914f3f54a3db Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 22 Sep 2026 00:01:29 +0800 Subject: [PATCH 1/3] add enter shortcut to submit text-based search filters --- .../Search/FilterDropdowns/ActionButtons.tsx | 4 +++- .../Search/FilterDropdowns/BasePopup.tsx | 16 +++++++++++++++- .../Search/FilterDropdowns/TextFilterPopup.tsx | 1 + .../Search/FilterDropdowns/TextInputPopup.tsx | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/components/Search/FilterDropdowns/ActionButtons.tsx b/src/components/Search/FilterDropdowns/ActionButtons.tsx index 76936bc330d7..bba7df0a33ce 100644 --- a/src/components/Search/FilterDropdowns/ActionButtons.tsx +++ b/src/components/Search/FilterDropdowns/ActionButtons.tsx @@ -12,11 +12,12 @@ type ActionButtonsProps = { containerStyle: React.ComponentProps['style']; resetSentryLabel?: string; applySentryLabel?: string; + shouldSubmitOnEnter?: boolean; onReset?: () => void; onApply: () => void; }; -function ActionButtons({containerStyle, resetSentryLabel, applySentryLabel, onReset, onApply}: ActionButtonsProps) { +function ActionButtons({containerStyle, resetSentryLabel, applySentryLabel, shouldSubmitOnEnter, onReset, onApply}: ActionButtonsProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); @@ -39,6 +40,7 @@ function ActionButtons({containerStyle, resetSentryLabel, applySentryLabel, onRe onPress={onApply} sentryLabel={applySentryLabel} > + {shouldSubmitOnEnter && } {translate('common.apply')} diff --git a/src/components/Search/FilterDropdowns/BasePopup.tsx b/src/components/Search/FilterDropdowns/BasePopup.tsx index 4ab4b42fd48b..a62e0c06eba3 100644 --- a/src/components/Search/FilterDropdowns/BasePopup.tsx +++ b/src/components/Search/FilterDropdowns/BasePopup.tsx @@ -18,12 +18,25 @@ type BasePopupProps = React.PropsWithChildren & { applySentryLabel: string; resetSentryLabel?: string; style?: StyleProp; + shouldSubmitOnEnter?: boolean; onApply: () => void; onReset?: () => void; onBackButtonPress?: () => void; }; -function BasePopup({children, label, applySentryLabel, resetSentryLabel, showLabel, shouldShowActionButtons = true, style, onApply, onReset, onBackButtonPress}: BasePopupProps) { +function BasePopup({ + children, + label, + applySentryLabel, + resetSentryLabel, + showLabel, + shouldShowActionButtons = true, + shouldSubmitOnEnter, + style, + onApply, + onReset, + onBackButtonPress, +}: BasePopupProps) { // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth const {isSmallScreenWidth} = useResponsiveLayout(); const styles = useThemeStyles(); @@ -50,6 +63,7 @@ function BasePopup({children, label, applySentryLabel, resetSentryLabel, showLab onApply={onApply} applySentryLabel={applySentryLabel} resetSentryLabel={resetSentryLabel} + shouldSubmitOnEnter={shouldSubmitOnEnter} /> )} diff --git a/src/components/Search/FilterDropdowns/TextFilterPopup.tsx b/src/components/Search/FilterDropdowns/TextFilterPopup.tsx index 92c5d679c3f3..e0be680d1f80 100644 --- a/src/components/Search/FilterDropdowns/TextFilterPopup.tsx +++ b/src/components/Search/FilterDropdowns/TextFilterPopup.tsx @@ -47,6 +47,7 @@ function TextFilterPopup({baseFilterKey, values, label, updateFilterForm, closeO label={label} onApply={applyChanges} applySentryLabel={`Search-FilterPopupApply-${baseFilterKey}`} + shouldSubmitOnEnter > Date: Thu, 24 Sep 2026 10:31:21 +0800 Subject: [PATCH 2/3] lint --- src/components/Search/FilterDropdowns/ActionButtons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Search/FilterDropdowns/ActionButtons.tsx b/src/components/Search/FilterDropdowns/ActionButtons.tsx index bba7df0a33ce..5230c3cad6fc 100644 --- a/src/components/Search/FilterDropdowns/ActionButtons.tsx +++ b/src/components/Search/FilterDropdowns/ActionButtons.tsx @@ -40,7 +40,7 @@ function ActionButtons({containerStyle, resetSentryLabel, applySentryLabel, shou onPress={onApply} sentryLabel={applySentryLabel} > - {shouldSubmitOnEnter && } + {!!shouldSubmitOnEnter && } {translate('common.apply')} From 5d8f3f140fde87e36af684b559c8fb159ae3bae9 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 24 Sep 2026 21:44:48 +0800 Subject: [PATCH 3/3] allow submit on enter for amount and report field --- src/components/Search/FilterDropdowns/AmountPopup.tsx | 1 + src/components/Search/FilterDropdowns/ReportFieldPopup.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/Search/FilterDropdowns/AmountPopup.tsx b/src/components/Search/FilterDropdowns/AmountPopup.tsx index 9dd35292c8b0..3527f1f904eb 100644 --- a/src/components/Search/FilterDropdowns/AmountPopup.tsx +++ b/src/components/Search/FilterDropdowns/AmountPopup.tsx @@ -42,6 +42,7 @@ function AmountInput({title, value, name, onSave, onBackButtonPress}: AmountInpu onApply={() => onSave(amount)} applySentryLabel={CONST.SENTRY_LABEL.SEARCH.FILTER_POPUP_APPLY_AMOUNT} onBackButtonPress={onBackButtonPress} + shouldSubmitOnEnter >