Clean up events

feature/default_network_editable
David Walsh 4 years ago
parent cdda54155e
commit 15aba70e74
  1. 3
      ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js
  2. 5
      ui/app/pages/swaps/searchable-item-list/item-list/item-list.component.js

@ -26,8 +26,7 @@ export default function DropdownSearchList ({
hideItemIf,
listContainerClassName,
}) {
function close() {
const close = () => {
setIsOpen(false)
onClose && onClose()
}

@ -34,6 +34,7 @@ export default function ItemList ({
return null
}
const onClick = () => onClickItem && onClickItem(result)
const {
iconUrl,
identiconAddress,
@ -52,8 +53,8 @@ export default function ItemList ({
'searchable-item-list__item--selected': selected,
'searchable-item-list__item--disabled': disabled,
})}
onClick={() => onClickItem && onClickItem(result)}
onKeyUp={e => e.key === "Enter" && onClickItem && onClickItem(result)}
onClick={onClick}
onKeyUp={e => e.key === "Enter" && onClick()}
key={`searchable-item-list-item-${i}`}
>
{(iconUrl || primaryLabel) && (<UrlIcon url={iconUrl} name={primaryLabel} />)}

Loading…
Cancel
Save