This code I have using ContextMenuArea breaks layo...
# compose-desktop
z
This code I have using ContextMenuArea breaks layout modifiers such as weight. In this example the weight modifier will not expand to fill the columns height
Copy code
Column(modifier = Modifier.fillMaxHeight) {
    ContextMenuArea(items = { emptyList() }) {
       Box(modifier = Modifier.weight(1f))
    }
}
Removing the ContextMenuArea surrounding the box fixes it but then there's no context menu. So what can I do? Or is this more a problem with how the context menu is handled?
e
I suspect Column can't see the modifier on a nested child. try putting the Box(modifier) outside of ContextMenuArea
z
Probably. That works for making the Box expand to fill the available space but then the ContextMenuArea only covers the occupied space of the content inside it