Skip to content

Instantly share code, notes, and snippets.

@surajitbasak109
Created February 10, 2020 20:27
Show Gist options
  • Save surajitbasak109/f7dc919d0d5c6167a3a29bac7750c5f7 to your computer and use it in GitHub Desktop.
Save surajitbasak109/f7dc919d0d5c6167a3a29bac7750c5f7 to your computer and use it in GitHub Desktop.
hanldeKeydown(evt) {
// ... more code ...
}
selectItem(id) {
const { searchItems } = this.state;
let selectedItem = searchItems.find(item => item.code === id);
const { code, name, unit, rate } = selectedItem;
this.setState({ item: { code, name, unit, rate }, searchItems: [] });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment