diff --git a/src/components/Dropdown/index.tsx b/src/components/Dropdown/index.tsx index 01c0168..0473340 100644 --- a/src/components/Dropdown/index.tsx +++ b/src/components/Dropdown/index.tsx @@ -88,6 +88,7 @@ const DropdownComponent: ( accessibilityLabel, itemAccessibilityLabelField, mode = 'default', + keyboardType } = props; const ref = useRef(null); @@ -490,6 +491,7 @@ const DropdownComponent: ( }} placeholderTextColor="gray" iconStyle={[{ tintColor: iconColor }, iconStyle]} + keyboardType={keyboardType} /> ); } @@ -508,6 +510,7 @@ const DropdownComponent: ( searchPlaceholder, testID, searchText, + keyboardType ]); const _renderList = useCallback( diff --git a/src/components/Dropdown/model.ts b/src/components/Dropdown/model.ts index 378c617..b0c5690 100644 --- a/src/components/Dropdown/model.ts +++ b/src/components/Dropdown/model.ts @@ -5,6 +5,7 @@ import type { TextProps, ImageStyle, FlatListProps, + KeyboardType } from 'react-native'; export type IDropdownRef = { @@ -66,4 +67,5 @@ export interface DropdownProps { searchQuery?: (keyword: string, labelValue: string) => boolean; onChangeText?: (search: string) => void; onConfirmSelectItem?: (item: T) => void; + keyboardType?: KeyboardType; } diff --git a/src/components/TextInput/index.tsx b/src/components/TextInput/index.tsx index 0fe4f05..ef20ffd 100644 --- a/src/components/TextInput/index.tsx +++ b/src/components/TextInput/index.tsx @@ -34,6 +34,7 @@ const TextInputComponent: CTextInput = (props) => { onChangeText = (_value: string) => {}, renderLeftIcon, renderRightIcon, + keyboardType } = props; const [text, setText] = useState(''); @@ -91,6 +92,7 @@ const TextInputComponent: CTextInput = (props) => { placeholder={placeholder} placeholderTextColor={placeholderTextColor} onChangeText={onChange} + keyboardType={keyboardType} /> {_renderRightIcon()}