maxkordiyak / react-native-dropdown-autocomplete

Autocomplete input with dropdown modal component for React native. Useful for pages with multiple autocomplete's.
MIT License
100 stars 51 forks source link

Style can't change #22

Closed kaleb07 closed 5 years ago

kaleb07 commented 5 years ago

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

PaitoAnderson commented 5 years ago

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

kaleb07 commented 5 years ago

<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

PaitoAnderson commented 5 years ago

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
kaleb07 commented 5 years ago

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 .

PaitoAnderson commented 5 years ago

Try:

inputStyle={{ paddingLeft: 10 }}
ghost commented 4 years ago

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