fix(nodes): force clear TextField focus on chip button click

closes #1228
pull/1233/head
andrekir 2024-09-08 08:27:38 -03:00
rodzic 4dcce57d44
commit e89f59745d
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -129,6 +129,7 @@ fun NodesScreen(
model: UIViewModel = hiltViewModel(),
chipClicked: (NodeInfo) -> Unit,
) {
val focusManager = LocalFocusManager.current
val state by model.nodesUiState.collectAsStateWithLifecycle()
val nodes by model.nodeList.collectAsStateWithLifecycle()
@ -183,7 +184,10 @@ fun NodesScreen(
distanceUnits = state.distanceUnits,
tempInFahrenheit = state.tempInFahrenheit,
isIgnored = state.ignoreIncomingList.contains(node.num),
chipClicked = { chipClicked(node) },
chipClicked = {
focusManager.clearFocus()
chipClicked(node)
},
blinking = node == focusedNode,
expanded = state.showDetails,
currentTimeMillis = currentTimeMillis