From dac7465cf858d283ddc788578ba0b0ce02c56990 Mon Sep 17 00:00:00 2001 From: Aravind <36630532+aravind3566@users.noreply.github.com> Date: Sat, 21 Dec 2024 08:27:30 +0700 Subject: [PATCH 1/3] Update index.tsx --- src/components/Dropdown/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Dropdown/index.tsx b/src/components/Dropdown/index.tsx index 9c6a599..c6d8b31 100644 --- a/src/components/Dropdown/index.tsx +++ b/src/components/Dropdown/index.tsx @@ -64,6 +64,7 @@ const DropdownComponent: ( labelField, valueField, searchField, + searchKeyboardType, value, activeColor = '#F6F7F8', fontFamily, @@ -560,6 +561,7 @@ const DropdownComponent: ( inputStyle={[inputSearchStyle, font()]} value={searchText} autoCorrect={false} + keyboardType={searchKeyboardType || 'default'} placeholder={searchPlaceholder} onChangeText={(e) => { if (onChangeText) { From ac860156841abbc337c8c3e7e58ae4409f441b6d Mon Sep 17 00:00:00 2001 From: Aravind <36630532+aravind3566@users.noreply.github.com> Date: Sat, 21 Dec 2024 08:29:23 +0700 Subject: [PATCH 2/3] Update model.ts --- src/components/Dropdown/model.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Dropdown/model.ts b/src/components/Dropdown/model.ts index a32bba5..1a05bb5 100644 --- a/src/components/Dropdown/model.ts +++ b/src/components/Dropdown/model.ts @@ -5,6 +5,7 @@ import type { TextProps, ImageStyle, FlatListProps, + KeyboardTypeOptions, } from 'react-native'; export type IDropdownRef = { @@ -45,6 +46,7 @@ export interface DropdownProps { searchPlaceholderTextColor?: string; disable?: boolean; autoScroll?: boolean; + searchKeyboardType? : KeyboardTypeOptions | 'default'; showsVerticalScrollIndicator?: boolean; dropdownPosition?: 'auto' | 'top' | 'bottom'; flatListProps?: Omit, 'renderItem' | 'data'>; From 0e269332fd44eba4b1c0e3d20102df3c4b6c80e1 Mon Sep 17 00:00:00 2001 From: Aravind <36630532+aravind3566@users.noreply.github.com> Date: Sat, 21 Dec 2024 08:32:49 +0700 Subject: [PATCH 3/3] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 647040a..8dce9e9 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,10 @@ yarn add react-native-element-dropdown | data | Array | Yes | Data is a plain array | | labelField | String | Yes | Extract the label from the data item | | valueField | String | Yes | Extract the primary key from the data item | -| searchField | String | No | Specify the field of data list you want to search | +| searchField | String | No | Specify the field of data list you want to search | +| searchKeyboardType | KeyboardTypeOptions | No | Specify the field of keyboard type list you want to use | | onChange | (item: object) => void | Yes | Selection callback | -| onChangeText | (search: string) => void | No | Callback that is called when the text input's text changes | +| onChangeText | (search: string) => void | No | Callback that is called when the text input's text changes | | value | Item | No | Set default value | | placeholder | String | No | The string that will be rendered before dropdown has been selected | | placeholderStyle | TextStyle | No | Styling for text placeholder |