title: Why isn't zIndex working in React Native?
body: <p>I've been trying to use the property <code>zIndex</code> on a <code>ScrollView</code> but it doesn't seem to be working. When I apply <code>zIndex</code> it looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/ZU8AA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZU8AA.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the <code>ScrollView</code> is being blocked by the input. I want the effect of having the <code>ScrollView</code> completely cover the other input when the suggestions come up, with <code>zIndex</code>. Here's what I have right now:</p>
  
  <pre><code>&lt;View&gt;
      &lt;Input
          value={this.state.inputValue}
          style={styles._input}
          inputStyle={styles._text}
          onChangeText={this.handleChangeText}
          {...this.props}
      /&gt;
      &lt;View style={styles._spacing}&gt;&lt;/View&gt;
      {predictions.length ?
          &lt;ScrollView
              style={styles._scroll}
          &gt;
              {predictions.map(this.renderPrediction)}
          &lt;/ScrollView&gt;
      : null}
  &lt;/View&gt;
  </code></pre>
  
  <p>Note that <code>Input</code> is a separate component that renders a specific <code>TextInput</code>. Also, <code>this.renderPrediction</code> returns this:</p>
  
  <pre><code>&lt;Text
      style={styles._text}
      key={index}
      onPress={this.handlePredictionPress.bind(null, prediction.description)}
  &gt;
      {prediction.description}
  &lt;/Text&gt;
  </code></pre>
  
  <p>And finally here are my styles:</p>
  
  <pre><code>const styles = EStyleSheet.create({
      input: StyleSheet.flatten([inputStyle]),
      text: {
          fontSize: 15,
      },
  
      spacing: {
          height: 10
      },
  
      scroll: {
          position: "absolute",
          zIndex: 10,
          width: "80%",
          top: 50,
          backgroundColor: "white"
      }
  });
  </code></pre>
  
  <p>Why isn't my <code>zIndex</code> attempt working and how can I get it to work as desired?</p>