Skip to content

Commit 9fbc1ae

Browse files
committed
Set minHeight for Label in Incubator.TextField to fix jump issue
1 parent 4a5aff3 commit 9fbc1ae

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

demo/src/screens/componentScreens/IncubatorTextFieldScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export default class TextFieldScreen extends Component {
142142
placeholder="Enter email"
143143
enableErrors
144144
validationMessage={['Email is required', 'Email is invalid']}
145-
validationMessageStyle={Typography.text90R}
145+
// validationMessageStyle={Typography.text90R}
146146
validationMessagePosition={errorPosition}
147147
validate={['required', 'email']}
148148
validateOnChange

src/incubator/TextField/Label.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const Label = ({
4343
return (
4444
<Text
4545
color={getColorByState(labelColor, context)}
46-
style={[labelStyle, floatingPlaceholder && styles.dummyPlaceholder]}
46+
style={[styles.label, labelStyle, floatingPlaceholder && styles.dummyPlaceholder]}
4747
{...labelProps}
4848
>
4949
{label}
@@ -55,6 +55,9 @@ const Label = ({
5555
};
5656

5757
const styles = StyleSheet.create({
58+
label: {
59+
minHeight: 20
60+
},
5861
dummyPlaceholder: {
5962
opacity: 0
6063
}

0 commit comments

Comments
 (0)