Skip to content

Commit fbc98ff

Browse files
committed
modify returnKeyType
1 parent 88321bf commit fbc98ff

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

android/src/main/java/com/variabletextinput/VariableTextInputViewManager.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,28 +289,22 @@ public void setOnSelectionChange(final VariableTextInput view, boolean onSelecti
289289
public void setKeyboardType(VariableTextInput view, String keyboardType) {
290290
switch (keyboardType) {
291291
case "default": {
292-
view.setImeOptions(EditorInfo.IME_ACTION_NONE);
293292
view.setInputType(EditorInfo.TYPE_CLASS_TEXT);
294293
}
295294
break;
296295
case "numeric":
297-
view.setImeOptions(EditorInfo.IME_ACTION_NONE);
298296
view.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
299297
break;
300298
case "email-address":
301-
view.setImeOptions(EditorInfo.IME_ACTION_NONE);
302299
view.setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
303300
break;
304301
case "phone-pad":
305-
view.setImeOptions(EditorInfo.IME_ACTION_NONE);
306302
view.setInputType(EditorInfo.TYPE_CLASS_PHONE);
307303
break;
308304
case "url":
309-
view.setImeOptions(EditorInfo.IME_ACTION_NONE);
310305
view.setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_URI);
311306
break;
312307
default:
313-
view.setImeOptions(EditorInfo.IME_ACTION_NONE);
314308
view.setInputType(EditorInfo.TYPE_CLASS_TEXT);
315309
break;
316310
}

src/VariableTextInputView.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
TextInputContentSizeChangeEventData,
1212
Platform,
1313
KeyboardTypeOptions,
14+
ReturnKeyTypeOptions,
1415
} from 'react-native';
1516
import React, {
1617
forwardRef,
@@ -60,6 +61,7 @@ interface INativeProps {
6061
onFocus?: () => void;
6162
onAndroidFocus?: () => void;
6263
onAndroidBlur?: () => void;
64+
returnKeyType?: ReturnKeyTypeOptions | undefined;
6365
}
6466
interface IProps {
6567
style?: StyleProp<TextStyle> | undefined;
@@ -84,6 +86,7 @@ interface IProps {
8486
onMention?: (data: IonMentionData) => void;
8587
onBlur?: () => void;
8688
onFocus?: () => void;
89+
returnKeyType?: ReturnKeyTypeOptions | undefined;
8790
}
8891
export type IATTextViewRef = React.ForwardedRef<IATTextViewBase>;
8992

0 commit comments

Comments
 (0)