Skip to content
Snippets Groups Projects
Unverified Commit bfa3828b authored by Trevor Farlow's avatar Trevor Farlow Committed by GitHub
Browse files

Schedule Editor: Keep payee list open while toggling transfer payees focus (#355)

* Schedule Editor: Keep payee list open while toggling transfer payees focus

This makes the schedule editor match the behavior of the PayeeAutocomplete in TransactionsTable

* Move fix to PayeeAutocomplete
parent f4ad715b
No related branches found
No related tags found
No related merge requests found
......@@ -217,6 +217,8 @@ export default function PayeeAutocomplete({
}
}
const [payeeFieldFocused, setPayeeFieldFocused] = useState(false);
return (
<Autocomplete
key={focusTransferPayees ? 'transfers' : 'all'}
......@@ -233,8 +235,11 @@ export default function PayeeAutocomplete({
}
return item.name;
}}
focused={payeeFieldFocused}
inputProps={{
...inputProps,
onBlur: () => setPayeeFieldFocused(false),
onFocus: () => setPayeeFieldFocused(true),
onChange: text => (rawPayee.current = text)
}}
onUpdate={value => onUpdate && onUpdate(makeNew(value, rawPayee))}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment