mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
AutoFocus the from input on swaps screen (#9581)
This commit is contained in:
parent
bbd4ee5fdf
commit
48dd3fe069
@ -212,6 +212,7 @@ export default function BuildQuote ({
|
|||||||
selectPlaceHolderText="Select"
|
selectPlaceHolderText="Select"
|
||||||
hideItemIf={(item) => item.address === selectedToToken?.address}
|
hideItemIf={(item) => item.address === selectedToToken?.address}
|
||||||
listContainerClassName="build-quote__open-dropdown"
|
listContainerClassName="build-quote__open-dropdown"
|
||||||
|
autoFocus
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
className={classnames('build-quote__balance-message', {
|
className={classnames('build-quote__balance-message', {
|
||||||
|
@ -36,6 +36,7 @@ export default function DropdownInputPair ({
|
|||||||
loading,
|
loading,
|
||||||
hideItemIf,
|
hideItemIf,
|
||||||
listContainerClassName,
|
listContainerClassName,
|
||||||
|
autoFocus,
|
||||||
}) {
|
}) {
|
||||||
const [isOpen, setIsOpen] = useState(false)
|
const [isOpen, setIsOpen] = useState(false)
|
||||||
const open = () => setIsOpen(true)
|
const open = () => setIsOpen(true)
|
||||||
@ -91,7 +92,8 @@ export default function DropdownInputPair ({
|
|||||||
onChange={onTextFieldChange}
|
onChange={onTextFieldChange}
|
||||||
fullWidth
|
fullWidth
|
||||||
margin="dense"
|
margin="dense"
|
||||||
value={ inputValue }
|
value={inputValue}
|
||||||
|
autoFocus={autoFocus}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{
|
{
|
||||||
@ -123,4 +125,5 @@ DropdownInputPair.propTypes = {
|
|||||||
loading: PropTypes.bool,
|
loading: PropTypes.bool,
|
||||||
hideItemIf: PropTypes.func,
|
hideItemIf: PropTypes.func,
|
||||||
listContainerClassName: PropTypes.string,
|
listContainerClassName: PropTypes.string,
|
||||||
|
autoFocus: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user