I'm not sure if i found a bug, or if I'm using thi...
# compose
z
I'm not sure if i found a bug, or if I'm using this incorrectly. I have a grid of items that should be able to be zoomed in or out. The problem is the grid doesn't recompose the contents when the
columns
field changes as a result of the
scale
changing.
Copy code
var scale by remember { mutableStateOf(78.dp) }
Copy code
LazyVerticalGrid(
    modifier = Modifier
        .weight(1f, true)
        .onPointerEvent(
            eventType = PointerEventType.Scroll,
            pass = PointerEventPass.Initial
        ) { ev ->
            if (!ev.keyboardModifiers.isCtrlPressed) return@onPointerEvent
            scale += ev.changes.first().scrollDelta.y.dp
        },
    columns = GridCells.FixedSize(scale),
    verticalArrangement = Arrangement.spacedBy(8.dp),
    horizontalArrangement = Arrangement.spacedBy(8.dp),
    contentPadding = PaddingValues(12.dp)
) {