wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.05k stars 2.67k forks source link

Header Style Shadows warnings can't be disabled #7845

Open LouisCapelle opened 9 months ago

LouisCapelle commented 9 months ago

What happened?

Setting header options with shadows, we get this error : (ADVICE) View #623 of type RCTView has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this, or apply the shadow to a more specific component.

What was the expected behaviour?

This warnings can't be disbaled

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

<Stack.Screen
  component={Help}
  name="Help"
  options={{
    headerShown: true,
    headerTitle: renderHeaderTitle,
    headerTitleAlign: 'center',
    headerShadowVisible: true,
    headerStyle: defaultHeaderStyle,
    headerBackTitleVisible: false,
    headerLeft: (props) => renderHeaderBackImage(props.onPress),
  }}
/>

const defaultHeaderStyle = {
    height: 70 + insets.top,
    shadowColor: colors.shadowBlack,
    elevation: 5,
    shadowOffset: {
      width: 0,
      height: 2,
    },
    shadowOpacity: 0.17,
    shadowRadius: 2,
    backgroundColor: backgroundColor,
  }

In what environment did this happen?

React Native Navigation version: ^6.1.9 React Native version: 0.71.14 Has Fabric (React Native's new rendering system) enabled: (yes/no) : no Node version: 18.19.0