Skip to content

Commit 50d702e

Browse files
committed
TextField inputStyle hasValue refactor
1 parent 7b3230d commit 50d702e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/incubator/TextField/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ const TextField = (props: InternalTextFieldProps) => {
116116
const _validationMessageStyle = useMemo(() => {
117117
return centered ? [validationMessageStyle, styles.centeredValidationMessage] : validationMessageStyle;
118118
}, [validationMessageStyle, centered]);
119-
const hasValue = useMemo(() => {
120-
return fieldState.value !== undefined;
121-
}, [fieldState.value]);
119+
const hasValue = fieldState.value !== undefined;
122120
const inputStyle = useMemo(() => {
123121
return [typographyStyle, colorStyle, others.style, hasValue && centered && styles.centeredInput];
124122
}, [typographyStyle, colorStyle, others.style, centered, hasValue]);

0 commit comments

Comments
 (0)