Skip to content
Browse files

Fix onLayout support in <TextInput>

The `onLayout` prop is overridden by `<TouchableWithoutFeedback>` and thus does not work on `<TextInput>` components.

This makes it so the following works.

<TextInput onLayout={...} />

I only tested on iOS but I assume a similar fix might be needed for Android.

**Test Plan** (confirm bug)
With fix, set `onLayout` on `<TextInput>` and see it is fired correctly.

<TextInput onLayout={function(e) { console.log(e.nativeEvent); }} />
Closes #8042

Differential Revision: D3417192

fbshipit-source-id: 536ec81d3479e6bda474ac766b27afb39242c01a
  • Loading branch information
paulshen authored and Facebook Github Bot 6 committed Jun 10, 2016
1 parent 13dfb62 commit 92926f9858c0b60cf9f2e51cb8f25f2e1501c9c1
Showing with 1 addition and 0 deletions.
  1. +1 −0 Libraries/Components/TextInput/TextInput.js
@@ -501,6 +501,7 @@ var TextInput = React.createClass({

return (

0 comments on commit 92926f9

Please sign in to comment.
You can’t perform that action at this time.