{"action":"closed","issue":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/5130","repository_url":"https://api.github.com/repos/react-navigation/react-navigation","labels_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/5130/labels{/name}","comments_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/5130/comments","events_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/5130/events","html_url":"https://github.com/react-navigation/react-navigation/issues/5130","id":370363266,"node_id":"MDU6SXNzdWUzNzAzNjMyNjY=","number":5130,"title":"headerLeft provided to navigationOptions renders even at root of stack (Android)","user":{"login":"peacechen","id":6295083,"node_id":"MDQ6VXNlcjYyOTUwODM=","avatar_url":"https://avatars3.githubusercontent.com/u/6295083?v=4","gravatar_id":"","url":"https://api.github.com/users/peacechen","html_url":"https://github.com/peacechen","followers_url":"https://api.github.com/users/peacechen/followers","following_url":"https://api.github.com/users/peacechen/following{/other_user}","gists_url":"https://api.github.com/users/peacechen/gists{/gist_id}","starred_url":"https://api.github.com/users/peacechen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peacechen/subscriptions","organizations_url":"https://api.github.com/users/peacechen/orgs","repos_url":"https://api.github.com/users/peacechen/repos","events_url":"https://api.github.com/users/peacechen/events{/privacy}","received_events_url":"https://api.github.com/users/peacechen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-15T22:08:41Z","updated_at":"2018-10-16T21:11:51Z","closed_at":"2018-10-16T21:11:50Z","author_association":"NONE","body":"### Current Behavior\r\n\r\nWhen providing `headerLeft` to a StackNavigator's navigationOptions, the component always displays, even when at the root of the stack.  The built-in headerLeft back button renders only when there's more than one screen on the stack; when it navigates to the root of the stack, it disappears.\r\n\r\nThis appears to be specific to Android.  From what I recall, it doesn't render at the root of the stack on iOS.\r\n\r\n### Expected Behavior\r\n\r\nI'd like to either replace only the icon with a custom one (keeping the default header behavior), or receive a prop in the headerLeft method to determine whether it's at the root of the stack.  I haven't found a way in the headerLeft callback to retrieve the stack of the StackNavigator stack.\r\n\r\n### How to reproduce\r\n\r\n```\r\n    return createStackNavigator(\r\n      {\r\n        'LOGIN': { screen: Login, navigationOptions: { header: null } },\r\n        'BOOKINGS': { screen: Bookings, navigationOptions: {title: 'Bookings', headerStyle: {elevation: 0}} },\r\n        // ... etc\r\n      },\r\n      {\r\n        initialRouteName: this.props.initialRouteName,\r\n        headerMode: 'screen',\r\n        headerLayoutPreset: 'center',\r\n        navigationOptions: {\r\n          headerStyle: {backgroundColor: 'blue'},\r\n          headerTitleStyle: {color: 'white'},\r\n          headerTintColor: {color: 'white'},\r\n          headerLeft: this.renderHeaderLeft,  // renders a white left-carat icon\r\n          gesturesEnabled: false,\r\n        },\r\n      }\r\n    );\r\n```\r\n\r\n### Your Environment\r\n\r\n| software         | version\r\n| ---------------- | -------\r\n| react-navigation | 2.17.0\r\n| react-native     | 0.56.2\r\n| node             | 9.3.0\r\n| npm or yarn      | 5.5.1\r\n"}}
{"actor":{"display_login":"brentvatne"}}