Don't show dropdown when empty.

This commit is contained in:
2023-05-11 23:37:12 +02:00
parent 9ddbdb698c
commit 2e40d0315c

View File

@@ -79,7 +79,7 @@ fun TypeaheadTextField(
colors = colors colors = colors
) )
ExposedDropdownMenu( ExposedDropdownMenu(
expanded = isFocused, expanded = isFocused && filtered.isNotEmpty(),
modifier = Modifier modifier = Modifier
.width(with(LocalDensity.current){dropDownWidth.toDp()}), .width(with(LocalDensity.current){dropDownWidth.toDp()}),
onDismissRequest = { } onDismissRequest = { }