mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Lint
This commit is contained in:
parent
15aba70e74
commit
14fff6dcf2
@ -26,19 +26,18 @@ export default function DropdownSearchList ({
|
||||
hideItemIf,
|
||||
listContainerClassName,
|
||||
}) {
|
||||
const t = useContext(I18nContext)
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const [selectedItem, setSelectedItem] = useState(startingItem)
|
||||
const close = () => {
|
||||
setIsOpen(false)
|
||||
onClose && onClose()
|
||||
}
|
||||
|
||||
const t = useContext(I18nContext)
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const [selectedItem, setSelectedItem] = useState(startingItem)
|
||||
const onClickItem = useCallback((item) => {
|
||||
onSelect && onSelect(item)
|
||||
setSelectedItem(item)
|
||||
close();
|
||||
}, [onClose, onSelect])
|
||||
close()
|
||||
}, [onSelect])
|
||||
|
||||
const onClickSelector = useCallback(() => {
|
||||
if (!isOpen) {
|
||||
@ -65,7 +64,7 @@ export default function DropdownSearchList ({
|
||||
<button
|
||||
className={classnames('dropdown-search-list', className)}
|
||||
onClick={onClickSelector}
|
||||
onKeyUp={e => e.key === 'Escape' && close()}
|
||||
onKeyUp={(e) => e.key === 'Escape' && close()}
|
||||
>
|
||||
{!isOpen && (
|
||||
<div
|
||||
|
@ -54,7 +54,7 @@ export default function ItemList ({
|
||||
'searchable-item-list__item--disabled': disabled,
|
||||
})}
|
||||
onClick={onClick}
|
||||
onKeyUp={e => e.key === "Enter" && onClick()}
|
||||
onKeyUp={(e) => e.key === 'Enter' && onClick()}
|
||||
key={`searchable-item-list-item-${i}`}
|
||||
>
|
||||
{(iconUrl || primaryLabel) && (<UrlIcon url={iconUrl} name={primaryLabel} />)}
|
||||
|
Loading…
Reference in New Issue
Block a user