byteburgers / react-native-autocomplete-input

Pure javascript autocomplete input for react-native
https://byteburgers.com/autocomplete
MIT License
805 stars 255 forks source link

Autocomplete result overlaying #178

Closed ahtisham09 closed 4 years ago

ahtisham09 commented 4 years ago

<View style={{ flex: 1, left: 0, position: 'absolute', right: 0, top: 0, height: '40%', zIndex: 9999, }}> <Autocomplete data={ dropdwon.length === 1 && comp(selectedValue, dropdwon[0].name) ? [] : dropdwon } autoCorrect={false} containerStyle={{flex: 1}} inputContainerStyle={{borderWidth: 0, borderBottomWidth: 0}} //defaultValue={this.state.selectedValue} //onChangeText={text => this.setState({selectedValue: text})} listStyle={{ backgroundColor: 'rgb(18,50,92)', marginTop: 50, marginHorizontal: 18, maxHeight: 170, }} renderItem={({item, i}) => ( <TouchableOpacity style={{flex: 1}} onPress={() => this.setState({selectedValue: item.name})}> <Text style={{ color: 'white', fontSize: 20, margin: 5, paddingLeft: 5, flex: 1, }}> {item.name} )} renderTextInput={({item, i}) => ( <FloatingLabelinput value={this.state.selectedValue} label={this.props.label} onChangeText={text => this.setState({selectedValue: text})} /> )} /> Simulator Screen Shot - iPhone 11 - 2020-08-31 at 22 48 12

sajorahasan commented 3 years ago

@ahtisham09 I am also facing the same issue so can you please share your solution if you have fixed this.

ahtisham09 commented 3 years ago

@sajorahasan yes i fixed this issue by raping the dropdown and second textinput and button in same view