React-native: Keyboard functionality for ListView

Created on 7 Sep 2015  ·  6Comments  ·  Source: facebook/react-native

Why aren't the ScrollView functionalities

  • keyboardShouldPersistTaps
  • keyboardDismissMode

available for ListView?

Is there a reason why they aren't available? (or are they simply not done yet?)

Locked

Most helpful comment

@gudmundurmar @ide I've added keyboardShouldPersistTaps="always" to my ListView. However, I'm experiencing the need for the user to tap twice when selecting an item in the list – one to close the keyboard and one to press the ListView row which houses a TouchableHighlight.

I'm using a TextInput for the search box and the ListView houses the results. I'd like the user to be able to choose an item in the list without having to close the keyboard first.

I must be missing something 😐

All 6 comments

They should be... Have you tried them?

I'm using React-native 0.8.0. Did it come after that?

I don't think so.. but we support only the latest code so you may want to try that.

I can't seem to get it working.
Would love it if someone could confirm that it works or doesn't work.

  1. _If it works for someone else_ then updating the ListView documentation accodordingly would be a solid move.
  2. _If it doesn't work_ then fixing/adding this feature would be wildly appreciated

My bad. I got it all working (was getting pretty tired yesterday and didn't notice I was using the main.jsbundle :< )
Adding this to the ListView documentation would be nice though. Thanks for the help @ide

@gudmundurmar @ide I've added keyboardShouldPersistTaps="always" to my ListView. However, I'm experiencing the need for the user to tap twice when selecting an item in the list – one to close the keyboard and one to press the ListView row which houses a TouchableHighlight.

I'm using a TextInput for the search box and the ListView houses the results. I'd like the user to be able to choose an item in the list without having to close the keyboard first.

I must be missing something 😐

Was this page helpful?
0 / 5 - 0 ratings