Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
Keyboard is only after autoFocus is true in TextInput react native

TextInput is working fine on android but on ios, it's not working until I added the prop autoFocus in TextInput. But after adding it works on a first component mount and then again I am not able to use the keyboard or write something in TextInput.

<TouchableOpacity
          activeOpacity={0.7}
          onLongPress={() => console.log("Long pressed")}
          style={{ ...this.props.itemStyle }}
          onPress={() => {
            console.log("Item is", item);
            this.setState({ item: item, focus: false });
            // this.props.onItemSelect(item);
            Keyboard.dismiss();
            setTimeout(() => {
              this.props.onItemSelect(item);
              if (this.props.resetValue) {
                this.setState({ focus: false, item: defaultItemValue });
                this.input.focus();
              }
            }, 0);
          }}
        >
          {this.props.selectedItems &&
          this.props.selectedItems.length > 3 &&
          this.props.selectedItems.find((x) => x.id === item.id) ? null : (
            <Image style={{ margin: 2 }} source={trend} />
          )}
          <Text style={{ ...this.props.itemTextStyle }}>{item.name}</Text>
        </TouchableOpacity>

   <TextInput
          autoFocus
          pointerEvents="none"
          autoCapitalize="none"
          onKeyPress={null}
          {...textInputProps}
        />

I don't know how can make it focused?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!