I am running the code in an Android Emulator. On iOS this problem doesn't occur. If you try tapping a TextInput in the bottom of the FlatList the Keyboard immediately closes, probably because the Input is below the Keyboard once it opens. Any clue would be appreciated
import React from 'react'; import { TextInput, FlatList } from 'react-native';
export default class App extends React.Component { render() { return (
<FlatList
data={["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t"]}
keyExtractor={item => item}
renderItem={({item}) => (
<TextInput [placeholder="0.0"][1]
/>
)}
/>
);
}
}
looks like <FlatList removeClippedSubviews={false} />
removeClippedSubviews is the key of problem and solution. Mine was true changed to false and we are good to go
TextInput inside a Faltlist loses focus when off-screen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With