Skip to content

Commit bb84273

Browse files
committed
remove duplicate code.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
1 parent 3543106 commit bb84273

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/components/AmountPicker/AmountSelectorModal.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {useFocusEffect} from '@react-navigation/native';
22
import React, {useCallback, useRef, useState} from 'react';
3-
import {Keyboard, View} from 'react-native';
3+
import {View} from 'react-native';
44
import AmountForm from '@components/AmountForm';
55
import Button from '@components/Button';
66
import HeaderWithBackButton from '@components/HeaderWithBackButton';
@@ -77,10 +77,7 @@ function AmountSelectorModal({value, description = '', onValueSelected, isVisibl
7777
large
7878
pressOnEnter
7979
text={translate('common.save')}
80-
onPress={() => {
81-
onValueSelected?.(currentValue ?? '');
82-
Keyboard.dismiss();
83-
}}
80+
onPress={() => onValueSelected?.(currentValue ?? '')}
8481
style={styles.mh5}
8582
/>
8683
</View>

src/components/Form/FormWrapper.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ function FormWrapper({
9595
shouldSubmitButtonBlendOpacity = false,
9696
shouldPreventDefaultFocusOnPressSubmit = false,
9797
onScroll = () => {},
98-
enterKeyEventListenerPriority = 1,
9998
}: FormWrapperProps) {
10099
const styles = useThemeStyles();
101100
const formRef = useRef<RNScrollView>(null);
@@ -215,7 +214,6 @@ function FormWrapper({
215214
submitFlexEnabled,
216215
shouldRenderFooterAboveSubmit,
217216
shouldPreventDefaultFocusOnPressSubmit,
218-
enterKeyEventListenerPriority,
219217
],
220218
);
221219

src/components/Form/types.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ type FormProps<TFormID extends OnyxFormKey = OnyxFormKey> = {
176176
* If `true`, the form will smoothly scroll to the bottom after interactions have completed.
177177
*/
178178
shouldScrollToEnd?: boolean;
179-
180-
/** The priority to assign the enter key event listener to buttons. 0 is the highest priority. */
181-
enterKeyEventListenerPriority?: number;
182179
};
183180

184181
type FormRef<TFormID extends OnyxFormKey = OnyxFormKey> = {

0 commit comments

Comments
 (0)