https://kotlinlang.org logo
Title
d

Dirk Hoffmann

01/31/2021, 10:41 PM
hmmm, my implementation of a thing similar to aboves SearchTextFieldDropdown: if I put
Column { for (i in 1..100) { Text("item $i") }
inside a `@Composable DropdownMenu()`'s
dropdownContent
the dropdown "disapears" if height is larger than the window height (and I cannot put it into an explicit LazyColumn as
dropdownContent
Clause is already a
ColumnScope
Is this a bug, or am I doing something wrong? (or is DrowdownMenu not meant to show things with height > Window.height?)
k

Kirill Grouchnikov

01/31/2021, 10:52 PM
The current drop-down implementation is limited to the window bounds. Right now you'd need to rollout your own implementation, probably based on JWindow and ComposePanel
d

Dirk Hoffmann

01/31/2021, 10:59 PM
yeah ... just also realized, that if the DropDown is visible and I resize the window a few times (making it smaller than the dropdown, bigger, small, bigger - while continuously holding the mouse key, you start first seeing white-non repainted areas and then the redrawing completely ... hmm, let's say "gives up"
but this doesn't happen to be the case "all" the times ...
also I wonder (completely different topic) why I connot make the Dropdown visible again (with its former contents) on clicking on trailingIcon `TextField`s
trailingIcon = {
                    IconButton(
                        onClick = { println("trailing search icon click") ; searchPopupVisibleState.value = true }
                    ) {
                        Icon(Icons.TwoTone.Search, contentDescription = "Top Search")
                    }
                },
onClick is not called at all, on pressing the trailingIcon (same with leadingIcon)