Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
Searchable dropdown menu with async data in react native

I'm trying to use a searchable dropdown menu in expo with async storage but when I try to write a text I get "undefined is not an object (evaluating 'item.name.toLowerCase')". I need help please, I would appreciate it a lot.

Also, the dropdown menu remains blank but when I click on it alerts the data. I don't know what else to do.

    try {
      const keys = await AsyncStorage.getAllKeys();
      const items = await AsyncStorage.multiGet(keys);
      setItem(items);
    } catch (error) {
      alert(error);
    }
  };
<SearchableDropdown
        onTextChange={(text) => console.log(text)}
        //On text change listner on the searchable input
        onItemSelect={(item) => alert(JSON.stringify(item))}
        //onItemSelect called after the selection from the dropdown
        containerStyle={{ padding: 5 }}
        //suggestion container style
        textInputStyle={{
          //inserted text style
          padding: 12,
          borderWidth: 1,
          borderColor: "#ccc",
          backgroundColor: "#FAF7F6",
        }}
        itemStyle={{
          //single dropdown item style
          padding: 10,
          marginTop: 2,
          backgroundColor: "#FAF9F8",
          borderColor: "#bbb",
          borderWidth: 1,
        }}
        itemTextStyle={{
          //text style of a single dropdown item
          color: "#222",
        }}
        itemsContainerStyle={{
          //items container style you can pass maxHeight
          //to restrict the items dropdown hieght
          maxHeight: "60%",
        }}
        items={item}
        //mapping of item array
        defaultIndex={2}
        //default selected item index
        placeholder="placeholder"
        //place holder for the search input
        resetValue={false}
        //reset textInput Value with true and false state
        underlineColorAndroid="transparent"
        //To remove the underline from the android input
      />```
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

In case you're using https://www.npmjs.com/package/react-native-searchable-dropdown , Refactor this line

<SearchableDropdown
 
        // You wrote item instead items
        items={items}
        the underline from the android input
      />


about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda