Skip to content

Commit a01c8ae

Browse files
luacmartinsOSBotify
authored andcommitted
Merge pull request #48848 from Expensify/monil-fixCurrencyShiftBug
[CP Staging] Revert some changes and fix UI bug (cherry picked from commit e694253) (CP triggered by luacmartins)
1 parent 7aa20c6 commit a01c8ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/AmountForm.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type AmountFormProps = {
4949
/** Whether the form should use a standard TextInput as a base */
5050
displayAsTextInput?: boolean;
5151
} & Pick<TextInputWithCurrencySymbolProps, 'hideCurrencySymbol' | 'extraSymbol'> &
52-
Pick<BaseTextInputProps, 'autoFocus' | 'hasError'>;
52+
Pick<BaseTextInputProps, 'autoFocus'>;
5353

5454
/**
5555
* Returns the new selection object based on the updated amount's length
@@ -69,6 +69,7 @@ function AmountForm(
6969
currency = CONST.CURRENCY.USD,
7070
extraDecimals = 0,
7171
amountMaxLength,
72+
errorText,
7273
onInputChange,
7374
onCurrencyButtonPress,
7475
displayAsTextInput = false,
@@ -297,11 +298,11 @@ function AmountForm(
297298
// eslint-disable-next-line react/jsx-props-no-spreading
298299
{...rest}
299300
/>
300-
{!!rest.errorText && (
301+
{!errorText && (
301302
<FormHelpMessage
302303
style={[styles.pAbsolute, styles.b0, canUseTouchScreen ? styles.mb0 : styles.mb3, styles.ph5, styles.w100]}
303304
isError
304-
message={rest.errorText}
305+
message={errorText}
305306
/>
306307
)}
307308
</View>

0 commit comments

Comments
 (0)