Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Warning "type RCTView has a shadow set but cannot calculate shadow efficiently" #1

@zhaomingli007

Description

@zhaomingli007

Hi Steffey,

This plugin helped me a lot. Thank you.

I encountered a warning when run your test from "react-native-popover-view-test-app", each time I click the "settings" icon on top-right.

image

My code looks like it below:

let shouldShowInPopover = true;

class MoreDropdown extends Component {
  render() {
    return (
      <ScrollView contentContainerStyle={{padding: 20}}>
        <Text style={{fontSize: 16, fontWeight: 'bold', marginBottom: 10}}>Popover Navigation</Text>
        <Text>Show Stack Views in Popover</Text>
        <View style={styles.row}>
          <View style={{flex: 1}}>
            <Text>Show Stack Views in Popover</Text>
            <Text style={{fontSize: 10, color: 'gray', marginTop: 5}}>You will need to change the device orientation for this setting to take effect.</Text>
          </View>
          <Switch value={shouldShowInPopover} onValueChange={() => {
            shouldShowInPopover = !shouldShowInPopover;
            this.forceUpdate();
          }} />
        </View>
      </ScrollView>
    )
  }
}

const AnaPopoverStack = createPopoverStackNavigator({
    Analysis: {
        screen: props =><Analysis navigation = {props.navigation} {...props.screenProps}/>,
        navigationOptions: ({navigation}) => ({
            title: '知己',
            headerRight: 
                <TouchableOpacity ref={ref => createPopoverStackNavigator.registerRefForView(ref, 'MoreDropdown')} onPress={() => navigation.navigate('MoreDropdown')} style={{width: 60, alignItems: 'center'}}><Icon name="dots-horizontal" size={30} /></TouchableOpacity>, 
    })
  },
  MoreDropdown: {
    screen: MoreDropdown,
    navigationOptions: {title: "MoreDropdown"},
    popoverOptions: {
      contentContainerStyle: {
        minWidth: 300
      }
    }
  }
}, {
  popoverOptions: {
    verticalOffset: Platform.OS === 'android' ? -StatusBar.currentHeight : 0
  }
})


export default class StackWrapper extends Component {
  render() {
    return (
        <AnaPopoverStack screenProps={{showInPopover: shouldShowInPopover}} />
    );
  }
}

Any idea about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions