AutoFocus the from input on swaps screen (#9581)

feature/default_network_editable
David Walsh 4 years ago committed by GitHub
parent bbd4ee5fdf
commit 48dd3fe069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      ui/app/pages/swaps/build-quote/build-quote.js
  2. 5
      ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.js

@ -212,6 +212,7 @@ export default function BuildQuote ({
selectPlaceHolderText="Select"
hideItemIf={(item) => item.address === selectedToToken?.address}
listContainerClassName="build-quote__open-dropdown"
autoFocus
/>
<div
className={classnames('build-quote__balance-message', {

@ -36,6 +36,7 @@ export default function DropdownInputPair ({
loading,
hideItemIf,
listContainerClassName,
autoFocus,
}) {
const [isOpen, setIsOpen] = useState(false)
const open = () => setIsOpen(true)
@ -91,7 +92,8 @@ export default function DropdownInputPair ({
onChange={onTextFieldChange}
fullWidth
margin="dense"
value={ inputValue }
value={inputValue}
autoFocus={autoFocus}
/>
)}
{
@ -123,4 +125,5 @@ DropdownInputPair.propTypes = {
loading: PropTypes.bool,
hideItemIf: PropTypes.func,
listContainerClassName: PropTypes.string,
autoFocus: PropTypes.bool,
}

Loading…
Cancel
Save