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 disabledColor: Color = MaterialTheme.colors.onSurface.copy(ContentAlpha.disabled)
|
||||||
|
|
||||||
|
val bankAutocompleteFocus = remember { FocusRequester() }
|
||||||
|
|
||||||
val loginNameFocus = remember { FocusRequester() }
|
val loginNameFocus = remember { FocusRequester() }
|
||||||
|
|
||||||
var isAddingAccount by remember { mutableStateOf(false) }
|
var isAddingAccount by remember { mutableStateOf(false) }
|
||||||
|
@ -97,6 +99,7 @@ fun AddAccountDialog(
|
||||||
AutocompleteTextField(
|
AutocompleteTextField(
|
||||||
label = "Bank (Suche mit Name, Ort, BIC oder Bankleitzahl)",
|
label = "Bank (Suche mit Name, Ort, BIC oder Bankleitzahl)",
|
||||||
value = enteredBankSearchQuery,
|
value = enteredBankSearchQuery,
|
||||||
|
textFieldFocus = bankAutocompleteFocus,
|
||||||
onEnteredTextChanged = { enteredBankSearchQuery = it },
|
onEnteredTextChanged = { enteredBankSearchQuery = it },
|
||||||
onSelectedItemChanged = {
|
onSelectedItemChanged = {
|
||||||
selectedBank = it
|
selectedBank = it
|
||||||
|
@ -166,4 +169,9 @@ fun AddAccountDialog(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LaunchedEffect(bankAutocompleteFocus) {
|
||||||
|
bankAutocompleteFocus.requestFocus()
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue