Skip to content

Instantly share code, notes, and snippets.

@surajitbasak109
Created February 10, 2020 20:29
Show Gist options
  • Select an option

  • Save surajitbasak109/5a026b3e1b386544b5d82cc549aafe6e to your computer and use it in GitHub Desktop.

Select an option

Save surajitbasak109/5a026b3e1b386544b5d82cc549aafe6e to your computer and use it in GitHub Desktop.
<ul className="list-group">
{searchItems.map((item, idx) => (
<li
className={cursor === idx ? "active list-group-item" : "list-group-item"}
key={idx}
onClick={() => selectItem(item.code)}
>
{item.name}
</li>
))}
</ul>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment