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

onLayout prop is missing x,y in callback's e.nativeEvent.layout #26

Open
fungilation opened this issue Mar 19, 2017 · 0 comments
Open

Comments

@fungilation
Copy link

fungilation commented Mar 19, 2017

I'm dropping in Tooltip as a replacement for my existing components, iterated as rows inside a listview over a data array. For example, a row:

<ToolTip onLayout={(e) => console.log(index, `Summary ${rowID} onLayout:`, e.nativeEvent.layout)}>
  <Text ...>
</ToolTip>

console logs would return for each row, e.nativeEvent.layout.width and .height as expected. .x and .y however always return 0, while TouchableHighlight returns the x,y coordinates of the rendered component as documented (React Native).

Is this a bug that e.nativeEvent.layout is not fully inherited from TouchableHighlight, or rather, the parent touchablewithoutfeedback?

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

1 participant