Can't select dropdown items in react-native-autocomplete-dropdown

Viewed 54

I am having an issue with react-native-autocomplete-dropdown. I can't select any items from the dropdown list. My code and screenshot of the dropdown is given below.

<View style={{flex: 0.97, flexDirection: 'column', marginLeft: 10}}>
        <View style={{flexDirection: 'row'}}>
          <Text
            style={{
              fontFamily: 'Titillium-Semibold',
              color: Colors.grey_888888,
              fontSize: 14,
            }}>
            Dropdown Items
          </Text>
          <Text
            style={{
              fontFamily: 'Titillium-Semibold',
              color: Colors.grey_888888,
              fontSize: 14,
            }}>
            *
          </Text>
        </View>
        <AutocompleteDropdown
          clearOnFocus={false}
          closeOnBlur={true}
          closeOnSubmit={false}
          onSelectItem={item => {
            item && setCustomerID(item.id);
          }}
          dataSet={[
            {id: '1', title: 'Alpha'},
            {id: '2', title: 'Beta'},
            {id: '3', title: 'Gamma'},
          ]}
          renderItem={(item, text) => (
            <Text style={{color: Colors.black, padding: 15}}>
              {item.title}
            </Text>
          )}
          inputContainerStyle={styles.dropdown}
        />
      </View>

screenshot

I think I am missing something here. Any suggestion would be well appreciated.

0 Answers
Related