ladjs / react-native-loading-spinner-overlay

:barber: React Native loading spinner overlay

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After dismissing the spinner, I can't tap on anything

djMax opened this issue · comments

I have the spinner component integrated at the top of the stack, like so:

    <RootStoreProvider value={rootStore}>
      <App />
      <Spinner
        visible={rootStore?.appService?.shouldShowSpinnerOverlay}
        textContent={rootStore?.appService?.spinnerOverlayMessage}
      />
    </RootStoreProvider>

When the app starts, everything is fine. When I click a button that sets shouldShowSpinnerOverlay to true and then false after 5 seconds, I can no longer press anything in the UI. I notice a UITransitionView is in the view hierarchy in xcode, which seems supsicious. RN 0.63.1

This happens even with a vanilla RN modal, so I have no idea what to make of that.

This appears to be an incompatibility between react-navigation and react-native Modal. So as a result, I don't think one can use react-native-loading-spinner-overlay with react-navigation.

For posterity, it was actually Flipper causing it facebook/flipper#1399

This happens even with a vanilla RN modal, so I have no idea what to make of that.

Hi djMax,
I had this problem and I used this trick. I placed the Spinner inside a View tag, and I hide the View, after the page completely loaded.

<View style={(this.state.spinner) ? {flex:1, flexDirection:'column'} : {display:'none', height: 0}}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={{color:'#fff'}}
/>

I hope this help...