From 48dd3fe069523a6e47ebeeb14344236f6a768efb Mon Sep 17 00:00:00 2001 From: David Walsh Date: Wed, 14 Oct 2020 11:43:55 -0500 Subject: [PATCH] AutoFocus the from input on swaps screen (#9581) --- ui/app/pages/swaps/build-quote/build-quote.js | 1 + .../pages/swaps/dropdown-input-pair/dropdown-input-pair.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/app/pages/swaps/build-quote/build-quote.js b/ui/app/pages/swaps/build-quote/build-quote.js index 1a03c7831..76388b1aa 100644 --- a/ui/app/pages/swaps/build-quote/build-quote.js +++ b/ui/app/pages/swaps/build-quote/build-quote.js @@ -212,6 +212,7 @@ export default function BuildQuote ({ selectPlaceHolderText="Select" hideItemIf={(item) => item.address === selectedToToken?.address} listContainerClassName="build-quote__open-dropdown" + autoFocus />
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, }