zubairpaizer / react-native-searchable-dropdown

Searchable Dropdown
148 stars 99 forks source link

onItemSelect does not fire #43

Open kitkline opened 4 years ago

kitkline commented 4 years ago

Hi....I must be doing some stupid but I cannot get onItemSelect to fire....even with a simple alert in it...Any help much appreciated...neat component!

<SearchableDropdown

        onItemSelect={item => {
          alert(item);
        }}
        containerStyle={{ padding: 5 }}
        onRemoveItem={(item, index) => {
          alert(item);
        }}
        itemStyle={{
          padding: 10,
          marginTop: 2,
          backgroundColor: "#FFFFFF",
          borderColor: "#bbb",
          borderWidth: 1,
          borderRadius: 5
        }}
        itemTextStyle={{ color: "#FF0000" }}
        itemsContainerStyle={{ maxHeight: 300 }}
        items={this.state.manufacturers}
        resetValue={false}
        textInputProps={{
          placeholder: "Start typing the manufacturer...",
          underlineColorAndroid: "transparent",
          style: {
            padding: 12,
            borderWidth: 1,
            borderColor: "#ccc",
            borderRadius: 5
          }
          //onTextChange: text => alert(text)
        }}
        listProps={{
          nestedScrollEnabled: true
        }}
      />
Infokora commented 4 years ago

@kitkline there solved your problem https://github.com/zubairpaizer/react-native-searchable-dropdown/issues/37#issuecomment-584539823

dembal1990 commented 3 years ago

+1