From 89a146a8287686f841459753e2abb188a4c45bf8 Mon Sep 17 00:00:00 2001 From: legend-oe Date: Wed, 1 May 2024 14:02:17 +0300 Subject: [PATCH 1/2] fixed Constants.isWeb --- src/components/textField/Input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/textField/Input.tsx b/src/components/textField/Input.tsx index ca49c70287..9de57af885 100644 --- a/src/components/textField/Input.tsx +++ b/src/components/textField/Input.tsx @@ -62,7 +62,7 @@ const Input = ({ return ( Date: Wed, 1 May 2024 14:05:25 +0300 Subject: [PATCH 2/2] fixed hasValue && centered --- src/components/textField/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/textField/index.tsx b/src/components/textField/index.tsx index c0c6ee2d36..dc72741840 100644 --- a/src/components/textField/index.tsx +++ b/src/components/textField/index.tsx @@ -120,8 +120,9 @@ const TextField = (props: InternalTextFieldProps) => { return centered ? [validationMessageStyle, styles.centeredValidationMessage] : validationMessageStyle; }, [validationMessageStyle, centered]); const hasValue = fieldState.value !== undefined; + const hasCenteredValue = fieldState.value ? (centered && styles.centeredInput) : undefined const inputStyle = useMemo(() => { - return [typographyStyle, colorStyle, others.style, hasValue && centered && styles.centeredInput]; + return [typographyStyle, colorStyle, others.style, hasCenteredValue]; }, [typographyStyle, colorStyle, others.style, centered, hasValue]); const dummyPlaceholderStyle = useMemo(() => { return [inputStyle, styles.dummyPlaceholder];