Skip to content

Commit

Permalink
Multi Select dropdown implementation customization
Browse files Browse the repository at this point in the history
  • Loading branch information
SAUL committed Oct 24, 2024
1 parent 8595974 commit 7b08ab0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/ui/components/WindowComponents.kt
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ fun <T> MultiSelectDropdown(
focusedLabelColor = foregroundColor
),
shape = RoundedCornerShape(8.dp),
value = if (selectedItems.isEmpty()) placeholder else selectedItems.joinToString(", "),
value = if (selectedItems.isEmpty()) placeholder else selectedItems.sortedBy(itemToString).joinToString(", "),
onValueChange = { },
textStyle = TextStyle(color = foregroundColor, fontSize = 12.sp, fontFamily = Font.RussoOne),
modifier = Modifier
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/ui/components/forms/PasswordForm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fun PasswordForm(

Column(modifier = Modifier.height(80.dp)) {
val items = listOf("Apple", "Banana", "Cherry", "Date", "Elderberry")
var selectedItems by remember { mutableStateOf(listOf<String>("Apple")) }
var selectedItems by remember { mutableStateOf(listOf<String>()) }

MultiSelectDropdown(
items = items,
Expand Down

0 comments on commit 7b08ab0

Please sign in to comment.