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

handleSelectItem not being called. #29

Closed dooleyb1 closed 4 years ago

dooleyb1 commented 4 years ago

Hi there,

The callback on selection doesn't seem to be firing for me. I've replaced the function with a simple console.log which is not being called also. Just wondering if you might be able to shed some light as to why? Thanks.

<Autocomplete
    data={data}
    handleSelectItem={(item, index) => console.log('CAN YOU HEAR ME')}
    minimumCharactersCount={1}
    highlightText
    valueExtractor={item => item.name}
    rightContent
    rightTextExtractor={item => item.code}
    initialValue={this.props.college}
    placeholder="e.g Trinity College Dublin"
    spinnerColor="#E14ED2"
    highLightColor="#E14ED2"
    noDataText="Invalid College/University"
    inputStyle={styles.input}
    containerStyle={styles.dropdownContainer}
    scrollStyle={styles.dropdownContainer}
/>
PaitoAnderson commented 4 years ago

I had this issue too and resolved it in #28

dooleyb1 commented 4 years ago

@PaitoAnderson Bang on, that fixed it. Thanks man 👍