Skip to content

After upgrading from 0.58 to 0.59 keyboard dismisses automatically when focused on TextInput inside a Flatlist #23916

@maulikgushani

Description

@maulikgushani

🐛 Bug Report

After upgrading from 0.58 to 0.59 keyboard dismisses automatically when focused on TextInput inside a Flatlist. Issues got in both ios and android.
flatlist

To Reproduce

  • Create flatlist with some data.
  • Create TextInput inside Flatlist
  • Run app and Observe behaviour

Expected Behavior

  • Keyboard not dismiss automatically and focus was not lost from TextInput.

Code Example

<FlatList
  data={this.state.productData}
  keyExtractor = {(item, index) => index.toString()}
  onEndReachedThreshold = {0.5}
  key={'product-list'}
  onEndReached = {() => this.state.callNextRequest==true ? this.handleEnd() : undefined}
  renderItem = {({item, index}) => (
    <View>
      <TextInput
        placeholder="Qty"
        value={this.state.qty[index]}
        onChangeText={(qty) => this.qtyChange(qty,index)}
        placeholderTextColor={COLOR_GRAY}
        keyboardType={'numeric'}
        style={style.qtyInput}
      />
    </View>
  )}
/>

Environment

React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz
Memory: 352.13 MB / 7.69 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 8.14.0 - /usr/bin/node
npm: 6.9.0 - /usr/bin/npm
SDKs:
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.2, 26.0.1, 26.0.3, 27.0.3, 28.0.0, 28.0.0, 28.0.3
System Images: android-P | Google APIs Intel x86 Atom
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.0 => 0.59.0
npmGlobalPackages:
react-native-cli: 2.0.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions