maxkordiyak / react-native-dropdown-autocomplete

Autocomplete input with dropdown modal component for React native. Useful for pages with multiple autocomplete's.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Style can't change

kaleb07 opened this issue · comments

Hi, i want to change style of dropdown autocomplete. But it's still same like default. Do you know what's wrong?

Can you share an example of what you are trying?

There are quite a few properties available for styling:
https://github.com/maxkordiyak/react-native-dropdown-autocomplete#properties

<Autocomplete
style={styles.inputBox3}
scrollToInput={ev => {}}
handleSelectItem={(item, id) => this.handleSelectItem(item, id)}
onDropdownClose={() => {}}
onDropdownShow={() => {}}
data={projects}
minimumCharactersCount={1}
highlightText
valueExtractor={item => item.title }
rightContent
rightTextExtractor={item => item.author}
placeholder="Pilih proyek"
/>

const styles = StyleSheet.create({
inputBox3:{
width: wp(90),
height: hp(6),
borderRadius:5,
borderWidth: 0.5,
borderColor: '#000000',
backgroundColor: '#F5F5F5',
fontSize:16,
color:'#000000',
marginVertical: 5,
}
});

I'm using responsive screen in my style

I see, instead of style={styles.inputBox3} try some of the other style properties we have like inputStyle={styles.inputBox3}.

Full list:
Screen Shot 2019-08-20 at 11 44 37 AM

It's working!! But, I don't want to use renderIcon. When i deleted renderIcon, the place of that icon is not deleted. The text is still next to icon place
WhatsApp Image 2019-08-20 at 23 29 27
.

Try:

inputStyle={{ paddingLeft: 10 }}

you know I'm trying to find the right styles for the last 2 hours. They really need clear explanation or examples.