diff --git a/src/components/forms/TextField.tsx b/src/components/forms/TextField.tsx index 62f30db47..bdface401 100644 --- a/src/components/forms/TextField.tsx +++ b/src/components/forms/TextField.tsx @@ -1,4 +1,4 @@ -import {createContext, useContext, useMemo, useRef} from 'react' +import React, {createContext, useContext, useMemo, useRef} from 'react' import { type AccessibilityProps, StyleSheet, @@ -11,6 +11,7 @@ import { import {HITSLOP_20} from '#/lib/constants' import {mergeRefs} from '#/lib/merge-refs' +import {isWeb} from '#/platform/detection' import { android, applyFonts, @@ -83,6 +84,20 @@ export function Root({children, isInvalid = false, style}: RootProps) { ], ) + // Check if any child has multiline prop + const hasMultiline = useMemo(() => { + let found = false + React.Children.forEach(children, child => { + if ( + React.isValidElement(child) && + (child.props as {multiline?: boolean})?.multiline + ) { + found = true + } + }) + return found + }, [children]) + return (