1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Suggestion not showing up for input

Discussão em 'Angular' iniciado por Ram01, Setembro 28, 2024.

  1. Ram01

    Ram01 Guest

    I am trying to learn react by practising a simple problem. I followed the below youtube tutorial https://www.youtube.com/watch?v=AsvybgZTryo&list=PLKhlp2qtUcSZiWKJTi5-5r6IRdHhxP9ZU&index=17

    but when I search for an item the suggestions are not coming, I debugged by putting console, still console not printing

    can you let me know what is the issue, providing the code snippet and stackblitz below

    https://stackblitz.com/edit/vitejs-.../App.css,src/components/pill.jsx&terminal=dev

    <ul className="suggestions-list">
    {suggestions?.users?.map((user, index) => {
    console.log('slectedUserSet --->', slectedUserSet);
    return slectedUserSet.has(user.email) ? (
    // current user which we selected
    <li key={user.email} onClick={() => handleSelectUser(user)}>
    <img
    src={user.image}
    alt={`${user.firstName} ${user.lastName}`}
    />
    <span>
    ${user.firstName} ${user.lastName}
    </span>
    </li>
    ) : (
    <></>
    );
    })}
    </ul>

    Continue reading...

Compartilhe esta Página