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

Icons doesnt appear using headerRight after react-navigation update ^3.0.0-rc.5  #7

@guptanisha

Description

@guptanisha

'headerRight' icon doesn't appear when headerBackButton shows. Happening after updated react-navigation to version ^3.0.0-rc.5.

Any help would be appreciated!!

software | version
react-navigation | 4.0.10
react-native | ^0.61.5
expo | 35
npm or yarn | npm

Current Behaviour:-
Screen Shot 2020-01-08 at 3 37 42 PM

Expected Behaviour:-
Screen Shot 2020-01-08 at 3 37 04 PM

static navigationOptions = ({ navigation }) => {
const activityId = navigation.state.params.activity.id;
let activity = Activities.getActivityById(activityId);
const client = navigation.state.params.client;
let responsiblePerson = getUserToNotify(client);
let responsibleContactNumber = getResponsibleContactNumber(responsiblePerson);

    if (responsibleContactNumber != null) {
        var number = responsibleContactNumber.number;
        if (responsibleContactNumber.countryCode == "33") {
            if ( (number.charAt(0)) != 0 ) {
                number = "0" + number;
            }
        }
    }
    return {
        headerTitle: null,
        headerStyle: { backgroundColor: '#fff' },
        headerTintStyle: Styles.colorPrimary,
        headerRight: () => (
            <View style={{flexDirection: 'row'}}>
                {client.cellNumber || client.homeNumber ?
                <TouchableOpacity 
                onPress={() => responsibleContactNumber == null ? null : Communications.phonecall(number, true)} 
                style={{flex: 1, paddingTop: 10, paddingBottom: 10, paddingLeft: 10}}>
                    <FontAwesome 
                        name='phone' 
                        style={{paddingHorizontal: 10, color: Styles.colorPrimary}}
                        size={23} 
                    />
                </TouchableOpacity>
                : null }
                {client ?
                <TouchableOpacity 
                onPress={() => navigation.navigate('ClientTabs', {data: client, deleteAvailable: false})}
                style={{flex: 1, paddingTop: 10, paddingBottom: 10, paddingLeft: 10}}>
                    <FontAwesome 
                        name='user' 
                        style={{paddingHorizontal: 10, color: Styles.colorPrimary}}
                        size={23} 
                    />
                </TouchableOpacity>
                : null }
                { activity.isDeclined != true ?
                <TouchableOpacity 
                onPress={() => navigation.navigate('AppointmentEditor', { activityId: activityId, onGoBack: navigation.state.params.onGoBack })} 
                style={{flex: 1, paddingTop: 10, paddingBottom: 10, paddingLeft: 10}}>
                    <FontAwesome 
                        name='pencil-square-o' 
                        style={{paddingHorizontal: 10, color: Styles.colorPrimary}}
                        size={23} 
                    />
                </TouchableOpacity>
                : null }
            </View>
        )
    };  
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions