Skip to content

Commit 34a546e

Browse files
authored
set textField initial width as placeholder width (#1523)
1 parent b16f6a0 commit 34a546e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/incubator/TextField/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const TextField = (props: InternalTextFieldProps) => {
176176
<View style={[paddings, fieldStyle]}>
177177
<View row centerV>
178178
{leadingAccessory}
179-
<View flex>
179+
<View flexG>
180180
{floatingPlaceholder && (
181181
<FloatingPlaceholder
182182
placeholder={placeholder}
@@ -187,12 +187,13 @@ const TextField = (props: InternalTextFieldProps) => {
187187
/>
188188
)}
189189
<Input
190+
placeholderTextColor={floatingPlaceholder ? 'transparent' : undefined}
190191
{...others}
191192
style={[typographyStyle, colorStyle, others.style]}
192193
onFocus={onFocus}
193194
onBlur={onBlur}
194195
onChangeText={onChangeText}
195-
placeholder={floatingPlaceholder ? undefined : placeholder}
196+
placeholder={placeholder}
196197
hint={hint}
197198
/>
198199
</View>

0 commit comments

Comments
 (0)