Focusing bank autocomplete box on start
This commit is contained in:
parent
025b91d318
commit
8d79bfc15d
|
@ -45,6 +45,8 @@ fun AddAccountDialog(
|
|||
|
||||
val disabledColor: Color = MaterialTheme.colors.onSurface.copy(ContentAlpha.disabled)
|
||||
|
||||
val bankAutocompleteFocus = remember { FocusRequester() }
|
||||
|
||||
val loginNameFocus = remember { FocusRequester() }
|
||||
|
||||
var isAddingAccount by remember { mutableStateOf(false) }
|
||||
|
@ -97,6 +99,7 @@ fun AddAccountDialog(
|
|||
AutocompleteTextField(
|
||||
label = "Bank (Suche mit Name, Ort, BIC oder Bankleitzahl)",
|
||||
value = enteredBankSearchQuery,
|
||||
textFieldFocus = bankAutocompleteFocus,
|
||||
onEnteredTextChanged = { enteredBankSearchQuery = it },
|
||||
onSelectedItemChanged = {
|
||||
selectedBank = it
|
||||
|
@ -166,4 +169,9 @@ fun AddAccountDialog(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LaunchedEffect(bankAutocompleteFocus) {
|
||||
bankAutocompleteFocus.requestFocus()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue