Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tapping a TextInput in the bottom of the FlatList the Keyboard immediately closes,

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]


            />
        )}
    />  
    );
}

}

like image 589
Eswaran Avatar asked Oct 16 '25 02:10

Eswaran


1 Answers

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

like image 178
Samir Avatar answered Oct 19 '25 00:10

Samir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!