using numeric keyboard type for beneficiary weight

This commit is contained in:
Nouman Tahir 2021-05-29 17:58:41 +05:00
parent 805cd6fa92
commit c6208d4cf4
3 changed files with 19 additions and 2 deletions

View File

@ -111,6 +111,7 @@ const BeneficiaryModal = ({ username, handleOnSaveBeneficiaries, isDraft }) => {
wrapperStyle={styles.weightFormInputWrapper}
onChange={(value) => _onWeightInputChange(value, index)}
onBlur={() => _onBlur(item)}
keyboardType='numeric'
/>
</View>
<View style={styles.usernameInput}>

View File

@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import { View, Platform } from 'react-native';
import { View, Platform, TextInputProps, ViewStyle, TextStyle } from 'react-native';
import FastImage from 'react-native-fast-image';
// Components
@ -13,6 +13,20 @@ import { getResizedAvatar } from '../../../utils/image';
// Styles
import styles from './formInputStyles';
interface Props extends TextInputProps {
type:string,
isFirstImage:boolean,
isEditable?:boolean,
leftIconName?:string,
rightIconName?:string,
iconType?:string,
wrapperStyle:ViewStyle,
height:number,
inputStyle:TextStyle,
isValid:boolean
}
const FormInputView = ({
placeholder,
type,
@ -29,7 +43,8 @@ const FormInputView = ({
isValid,
value,
onBlur,
}) => {
...props
}:Props) => {
const [_value, setValue] = useState(value || '');
const [inputBorderColor, setInputBorderColor] = useState('#e7e7e7');
const [_isValid, setIsValid] = useState(true);
@ -118,6 +133,7 @@ const FormInputView = ({
placeholderTextColor={isDarkTheme ? '#526d91' : '#788187'}
autoCorrect={false}
contextMenuHidden={false}
{...props}
/>
)}
</ThemeContainer>