@@ -53,7 +53,7 @@ type NumberWithSymbolFormProps = {
5353 shouldWrapInputInContainer ?: boolean ;
5454
5555 /** Reference to the outer element */
56- forwardedRef ?: ForwardedRef < BaseTextInputRef > ;
56+ ref ?: ForwardedRef < BaseTextInputRef > ;
5757} & Omit < TextInputWithSymbolProps , 'formattedAmount' | 'onAmountChange' | 'placeholder' | 'onSelectionChange' | 'onKeyPress' | 'onMouseDown' | 'onMouseUp' > ;
5858
5959type NumberWithSymbolFormRef = {
@@ -108,7 +108,7 @@ function NumberWithSymbolForm({
108108 shouldApplyPaddingToContainer = false ,
109109 shouldUseDefaultLineHeightForPrefix = true ,
110110 shouldWrapInputInContainer = true ,
111- forwardedRef ,
111+ ref ,
112112 ...props
113113} : NumberWithSymbolFormProps ) {
114114 const styles = useThemeStyles ( ) ;
@@ -318,12 +318,12 @@ function NumberWithSymbolForm({
318318 accessibilityLabel = { label }
319319 value = { formattedNumber }
320320 onChangeText = { setFormattedNumber }
321- ref = { ( ref : BaseTextInputRef | null ) => {
322- if ( typeof forwardedRef === 'function' ) {
323- forwardedRef ( ref ) ;
324- } else if ( forwardedRef && 'current' in forwardedRef ) {
325- // eslint-disable-next-line react-compiler/react-compiler, no-param-reassign
326- forwardedRef . current = ref ;
321+ ref = { ( newRef : BaseTextInputRef | null ) => {
322+ if ( typeof ref === 'function' ) {
323+ ref ( newRef ) ;
324+ } else if ( ref && 'current' in ref ) {
325+ // eslint-disable-next-line no-param-reassign
326+ ref . current = newRef ;
327327 }
328328 } }
329329 prefixCharacter = { symbol }
@@ -348,14 +348,14 @@ function NumberWithSymbolForm({
348348 onChangeAmount = { setNewNumber }
349349 onSymbolButtonPress = { onSymbolButtonPress }
350350 placeholder = { numberFormat ( 0 ) }
351- ref = { ( ref : BaseTextInputRef | null ) => {
352- if ( typeof forwardedRef === 'function' ) {
353- forwardedRef ( ref ) ;
354- } else if ( forwardedRef && 'current' in forwardedRef ) {
351+ ref = { ( newRef : BaseTextInputRef | null ) => {
352+ if ( typeof ref === 'function' ) {
353+ ref ( newRef ) ;
354+ } else if ( ref && 'current' in ref ) {
355355 // eslint-disable-next-line no-param-reassign
356- forwardedRef . current = ref ;
356+ ref . current = newRef ;
357357 }
358- textInput . current = ref ;
358+ textInput . current = newRef ;
359359 } }
360360 symbol = { symbol }
361361 hideSymbol = { hideSymbol }
0 commit comments