TextInput's onLayout not called
See original GitHub issueNot sure why the onLayout
is not called in TextInput
component but called in View
component.
<TextInput
ref="textInput"
onLayout={(e) => {
console.log('--- this is not called?')
}}
style={{height: 44, color: 'black', borderColor: 'black', borderWidth: 1, paddingHorizontal: 10, marginHorizontal: 10}}
placeholder='text here'
text={'cool'}
placeholderTextColor={'rgba(0,0,0,.4)'}
underlineColorAndroid='rgba(0,0,0,0)'
/>
Sample project here
React Native version: 0.28.0 Target: iOS 9.3 Development OS: OS X
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
TextInput onLayout not working · Issue #996 - GitHub
When I set onLayout event handler on a TextInput I get this error Warning: Unknown event handler property onLayout. It will be ignored....
Read more >onLayout not being called - react native - Stack Overflow
In my case onLayout isn't called because items were rendered in FlatList so only several items were rendered on mount.
Read more >[Solved]-onLayout not being called-React Native
Coding example for the question onLayout not being called-React Native.
Read more >TextInput - React Native
A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, such as auto- ...
Read more >Using onLayout | React Native By Example - Packt Subscription
To calculate a component's height, we can utilize its onLayout property to fire a ... The onLayout property is an event that is...
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 Free
Top 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
@facebook-github-bot open this is an outstanding bug and it is not fixed on version 0.38.0-rc1 I confirm
https://github.com/facebook/react-native/releases/tag/v0.29.0-rc.0 Fixed in RN 29