question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AutoComplete dropdown in ios is not scrollable

See original GitHub issue

I can’t scroll my drop down list in ios but in android i can. I checked a lot of suggestions and nothing doesn’t help.

this is my code `return ( <View style={styles.container}> {showAddChar && ( <Text style={styles.addChar} onPress={this.onChoosenItem}> + </Text> )} <Autocomplete data={data} defaultValue={query} onChangeText={(text: string) => this.setState({ query: text, hideResult: false }) } keyExtractor={index => index[‘id’].toString()} inputContainerStyle={styles.inputContainerStyle} listContainerStyle={{}} listStyle={styles.listStyle} style={{ fontSize: 18 }} hideResults={hideResult} placeholder={placeholder} renderItem={({ item }) => ( <TouchableOpacity style={styles.item} onPress={() => this.onChoosenItem(item)} > <Text>{item[‘name’]}</Text> </TouchableOpacity> )} /> </View> ); } }

const styles = StyleSheet.create({ container: { left: 0, position: ‘absolute’, right: 0, top: 0 }, addChar: { zIndex: 1, position: ‘absolute’, fontSize: 30, right: 0, top: 0 }, inputContainerStyle: { borderColor: ‘rgb(70, 48, 235)’, borderBottomWidth: 3, borderTopWidth: 0, borderRightWidth: 0, borderLeftWidth: 0 }, // listContainerStyle: {height:filteredMembers.length * 70}, listStyle: { borderColor: ‘grey’, margin: 0, overflow: ‘scroll’, maxHeight: 200 }, item: { fontSize: 16, borderBottomColor: ‘grey’, borderBottomWidth: 2, padding: 12 } });`

***** that what i get in IOS Screen Shot 2019-10-29 at 12 12 48

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
Bashamd455commented, Jun 1, 2020

Hey, @tayloraleach I could fix the scrolling issue in Android and iOS by following https://github.com/mrlaessig/react-native-autocomplete-input/issues/64#issuecomment-507388606 logic and by sending listStyle={{ maxHeight: 350 }} prop to AutoComplete Input.

1reaction
Garamanicommented, Aug 20, 2021

The solutions suggested here didn’t work for me, the solution that worked:

  • adding flex: 1 to listContainerStyle which is the parent of FlatList.
  • adding style: {height: 400} to flatListProps
Read more comments on GitHub >

github_iconTop Results From Across the Web

react native AutoComplete dropdown in ios isn't scrollable
I want to use autoComplete input in react-native, the best option i found was react-native-autocomplete-input, my problem is that i can't ...
Read more >
react-native-dropdown-autocomplete-textinput - npm
Simple cross platform (Android/iOS) searchable and scrollable dropdown autocomplete textinput for React Native App!
Read more >
autofill - CSS: Cascading Style Sheets - MDN Web Docs
The :autofill CSS pseudo-class matches when an element has its value autofilled by the browser. The class stops matching if the user edits ......
Read more >
Will users scroll the autocomplete results on a mobile device?
You need to provide visual clues to the fact that there's something behind. Since the keyboard is stuck at the bottom of the...
Read more >
Creating an accessible autocomplete experience
Another issue we encountered had to do with iOS Safari page scrolling behavior. When the onscreen keyboard is visible, iOS Safari makes the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found