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

TouchableOpacity onPress not called when component is rendered in the sidebar #9

Open
mgenov opened this issue Apr 30, 2019 · 1 comment

Comments

@mgenov
Copy link

mgenov commented Apr 30, 2019

The TouchableOpacity's onPress call is not called when the component is rendered in the sidebar.

This is the component definition:

const IconButton = ({
  onPress,
  name,
  family,
  size,
  disabled,
  color,
  style
}) => (
  <TouchableOpacity style={style} onPress={onPress} disabled={disabled}>
    <Icon
      name={name}
      family={family}
      size={size}
      color={disabled ? (color ? color : theme.colors.disabled) : color}
    />
  </TouchableOpacity>
)
@geoseong
Copy link

Although it's so late reply,
as user of this library, I had same problem as yours.
actually I got this problem about year ago using this...
temp ugly solution is turning off(remove) the panResponder options in SidebarView.js.

remove this line

I know, this cause no PanResponder action like user from threshold of sidebar to outside to make sidebar appear.

If I master PanResponder action some day, I will find the better solution..

geoseong added a commit to geoseong/react-native-sidebar that referenced this issue Feb 29, 2020
- because of onPress not triggered in sidebar component.
- related issues: christoph-jerolimov#9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants