Skip to content

Commit

Permalink
TextField inputStyle hasValue refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
adids1221 committed Jun 28, 2023
1 parent 919e536 commit 5da37a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/incubator/TextField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ const TextField = (props: InternalTextFieldProps) => {
const _validationMessageStyle = useMemo(() => {
return centered ? [validationMessageStyle, styles.centeredValidationMessage] : validationMessageStyle;
}, [validationMessageStyle, centered]);
const hasValue = useMemo(() => {
return fieldState.value !== undefined;
}, [fieldState.value]);
const hasValue = fieldState.value !== undefined;
const inputStyle = useMemo(() => {
return [typographyStyle, colorStyle, others.style, hasValue && centered && styles.centeredInput];
}, [typographyStyle, colorStyle, others.style, centered, hasValue]);
Expand Down

0 comments on commit 5da37a7

Please sign in to comment.