ToolbarAction Hamburger (Left Icon) onPress not working properly in iOs
See original GitHub issueCurrent behaviour
ToolbarAction onPress is not fired on iOs when click on left most icon (Hamburger icon) . It works sometimes when click on left bottom of the icon.
Works fine on android though
Same issue for back button in Search bar on iOs
Expected behaviour
onPress should be fired when click on left most icon (Hamburger icon) on iOs
Code sample
renderToolbar = () => {
const {
type,
isBack,
enableSearch,
enableOptions,
enableNextOption,
enableSubtitle,
subtitle,
goBack,
onDrawerPress
} = this.props;
return (
<Toolbar>
{isBack ? (
<ToolbarBackAction onPress={goBack} />
) : (
<ToolbarAction icon="menu" onPress={onDrawerPress} />
)}
<ToolbarContent
title={type}
subtitle={enableSubtitle ? subtitle : null}
style={styles.title}
/>
{enableNextOption && (
<ToolbarAction icon="add" onPress={this._onAdd} />
)}
{enableSearch && (
<ToolbarAction icon="search" onPress={this._onSearch} />
)}
{enableOptions && this.renderOptions()}
</Toolbar>
);
};
Screenshots (if applicable)
What have you tried
Tried to use the same code from example app … Same bug
Your Environment
software | version |
---|---|
ios or android | ios |
react-native | 0.55.4 |
react-native-paper | 1.8.0 |
node | v8.8.1 |
npm or yarn | 5.4.2 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Icon onPress only working for Android and not iOS
I'm trying to make a custom header component with an icon that can either toggle the navigation drawer or navigate ...
Read more >How to do Hamburger Menu in React-Native Application
These icons are clickable and will be in bottomed page. We need to create assets folder in root directory. If we not, application...
Read more >Animated hamburger menu icons for React
Hamburger menu icons for React, with CSS-driven transitions. ... Direction: not applicable ... The animation direction of the icon, left or right.
Read more >React Native Drawer Navigator Android iOS Tutorial with ...
The drawer opening and closing will be controlled by pressing the Hamburger Icon at the top left side of application screen.
Read more >Example to Use React Native Vector Icons
Importing Icon Files in iOS; Lastly, Import icon component in your project and start using it. How to use Icon Component? For the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s a react native issue, so it might have been fixed there. If you can still repro it, let me know and I’ll re-open the issue in the React Native repo.
I was able to get this working on a new project [rn version: 0.56] Having this issue still with 0.55.4 … I will investigate further and re-open this if needed