Fixed that loginName got focused even though no bank was selected

This commit is contained in:
dankito 2024-09-09 22:52:13 +02:00
parent a257223543
commit 685adad6b3
1 changed files with 4 additions and 4 deletions

View File

@ -90,9 +90,7 @@ fun AddAccountDialog(
showProgressIndicatorOnConfirmButton = isAddingAccount,
useMoreThanPlatformDefaultWidthOnMobile = true,
onDismiss = { dismiss() },
onConfirm = {
confirmCalled()
}
onConfirm = { confirmCalled() }
) {
Column {
@ -102,7 +100,9 @@ fun AddAccountDialog(
onEnteredTextChanged = { enteredBankSearchQuery = it },
onSelectedItemChanged = {
selectedBank = it
loginNameFocus.requestFocus()
if (it != null) {
loginNameFocus.requestFocus()
}
},
getItemTitle = { bank -> bank.name },
fetchSuggestions = { query -> bankingService.findBanks(query) }