Skip to content

Commit

Permalink
add dropdown list to facilitate selecting from a long Request Example…
Browse files Browse the repository at this point in the history
… list
  • Loading branch information
sunny-chung committed Jul 8, 2024
1 parent ea6f8ea commit 5330dbd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,20 @@ fun RequestEditorView(
},
modifier = Modifier.padding(4.dp)
)

DropDownView(
iconResource = "list-ul-alt.svg",
iconSize = 24.dp,
items = request.examples.map { DropDownKeyValue(it.id, it.name) },
isShowLabel = false,
onClickItem = { clicked ->
request.examples.firstOrNull { it.id == clicked.key }?.let {
onSelectExample(it)
true
} ?: false
},
modifier = Modifier.padding(4.dp)
)
}

val tabs = when (request.application) {
Expand Down
4 changes: 4 additions & 0 deletions src/jvmMain/resources/image/list-ul-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5330dbd

Please sign in to comment.