Closed
Description
Description
I'm trying to make a UISearchField
using RN components, and I'm unable to create a center-aligned text-and-icon layout for the placeholder ("empty state") of the text field.
I've added some borders and background colors to highlight what's going on - notice how the light-blue area (where the TextInput
is) is collapsed to near-zero width:
However, if I replace the TextInput
with a Text
component, the layout works as expected with flexGrow
and flexShrink
:
Reproduction
I've created a sample project here that demonstrates the issue: https://sketch.expo.io/Sk5b_uEox
Solution
Adjust TextInput's implementation so its value
and placeholder
work with flexGrow
and flexShrink
.
Additional Information
- React Native version: RN v43
- Platform: iOS, haven't tried Android
- Dev tools: iOS 10.2