import { View } from "react-native"; import type { Field, FieldControlProps } from "../../common/constants"; import { Text, TextInput, type TextInputProps } from "react-native-paper"; import { fieldStyles } from "../../styles/control-styles"; import FormUtils from "../../utils/FormUtil"; interface Props extends FieldControlProps { field: Field; } function MultitextControl(props: Props) { const maxLength = FormUtils.getNumberOrUndefined(props.field.meta?.validation?.max); // TODO - fix datatype any const numberOfLines = ((props.field.meta.config as Record).numberOfLines as any) || 4; return ( : } numberOfLines={numberOfLines} maxLength={maxLength} multiline /> { props.error.hasError && ( {props.error.errorMsg} ) } ); } export default MultitextControl;