Skip to content

Commit

Permalink
fix: textInput label jumps to the center (#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlimpiaZurek authored Sep 23, 2020
1 parent 28d120a commit efe17be
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/TextInput/TextInputOutlined.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ class TextInputOutlined extends React.Component<ChildTextInputProps> {
const baseLabelTranslateY =
-labelHalfHeight - (topPosition + OUTLINE_MINIMIZED_LABEL_Y_OFFSET);

const placeholderOpacity = interpolatePlaceholder(
parentState.labeled,
hasActiveOutline
);
const placeholderOpacity = hasActiveOutline
? interpolatePlaceholder(parentState.labeled, hasActiveOutline)
: parentState.labelLayout.measured
? 1
: 0;

const labelProps = {
label,
Expand Down

0 comments on commit efe17be

Please sign in to comment.