Aliaksandr Yedomski
Aliaksandr Yedomski

Reputation: 48

React Native: Modal overlaps a root component

I have such structure of screen:

import Modal from 'react-native-modal';
...
<View>
  <MessageBar />
  <Modal>
    <modal content is here>
  </Modal>
</View>

MessageBar is a rectangle with styles: {position: absolute, zIndex: 1000}

As a result, MessageBar anyway is overlaped by Modal backdrop. I tried all possible combination with position and zIndex for both - Modal and MessageBar.

Any help is appreciated.

Thanks

Upvotes: 0

Views: 1358

Answers (1)

Sukhdeep Singh Kalra
Sukhdeep Singh Kalra

Reputation: 827

If you are using Modal, then it will always overlap the components on the screen regardless of whatever zIndex you give to the componets.

Upvotes: 1

Related Questions