mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Clean up events
This commit is contained in:
parent
cdda54155e
commit
15aba70e74
@ -26,8 +26,7 @@ export default function DropdownSearchList ({
|
|||||||
hideItemIf,
|
hideItemIf,
|
||||||
listContainerClassName,
|
listContainerClassName,
|
||||||
}) {
|
}) {
|
||||||
|
const close = () => {
|
||||||
function close() {
|
|
||||||
setIsOpen(false)
|
setIsOpen(false)
|
||||||
onClose && onClose()
|
onClose && onClose()
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ export default function ItemList ({
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onClick = () => onClickItem && onClickItem(result)
|
||||||
const {
|
const {
|
||||||
iconUrl,
|
iconUrl,
|
||||||
identiconAddress,
|
identiconAddress,
|
||||||
@ -52,8 +53,8 @@ export default function ItemList ({
|
|||||||
'searchable-item-list__item--selected': selected,
|
'searchable-item-list__item--selected': selected,
|
||||||
'searchable-item-list__item--disabled': disabled,
|
'searchable-item-list__item--disabled': disabled,
|
||||||
})}
|
})}
|
||||||
onClick={() => onClickItem && onClickItem(result)}
|
onClick={onClick}
|
||||||
onKeyUp={e => e.key === "Enter" && onClickItem && onClickItem(result)}
|
onKeyUp={e => e.key === "Enter" && onClick()}
|
||||||
key={`searchable-item-list-item-${i}`}
|
key={`searchable-item-list-item-${i}`}
|
||||||
>
|
>
|
||||||
{(iconUrl || primaryLabel) && (<UrlIcon url={iconUrl} name={primaryLabel} />)}
|
{(iconUrl || primaryLabel) && (<UrlIcon url={iconUrl} name={primaryLabel} />)}
|
||||||
|
Loading…
Reference in New Issue
Block a user