Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using titleComponent and leftCorner isn´t compatible #101

Open
BigPun86 opened this issue Mar 16, 2016 · 2 comments
Open

Using titleComponent and leftCorner isn´t compatible #101

BigPun86 opened this issue Mar 16, 2016 · 2 comments
Labels

Comments

@BigPun86
Copy link
Contributor

Hey there!

I have a component where i use a custom titleComponent with an custom leftCorner component. I need the leftCorner to trigger my side menu. now i have figured out, when i only use the leftCorner everything is fine. i can trigger the sidemenu with the customAction callback in my Router. Now when i use both, leftCorner and titleComponent, then my leftCorner "button" won´t be triggered....

Anyone with similar issue or some hints?

this.props.toRoute({
    name: 'HOME',
    component: Routes.Dashboard,
    //titleComponent: Title,
    //titleProps: {...this.props},
    leftCorner: BurgerMenu,
    headerStyle: {backgroundColor: 'white'}
})

export class BurgerMenu extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <TouchableHighlight
                underlayColor={'transparent'}
                onPress={()=>this.props.customAction("BurgerMenu")}>
                <Image source={Theme.Images.ICONS_BURGER_MENU} style={styles.burgerMenu}/>
            </TouchableHighlight>
        )
    }
}

export class Title extends Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <Text style={[styles.navBarText, Theme.mix('textSemiBold|medium|regular')]}>{translate('camigos')}</Text>
        )
    }
}
@BigPun86
Copy link
Contributor Author

Fixed it by giving my Title Component a fix width

@charpeni charpeni added the Bug label Mar 18, 2016
@charpeni
Copy link
Contributor

Hmmm.. Strange behaviour.

It's sound like the title component overlaps other components.

Thank you for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants