Hi! I’ve been writing a compose desktop app, and t...
# compose
e
Hi! I’ve been writing a compose desktop app, and the main page of the app is a grid layout with dynamically positioning — it’s a dashboard and the widgets + their placement will be sent over the network. Using the Layout composable I created a Grid element and an extentension for Modifier that takes the grid column and row, and column span and row span. This all works fine the first time it’s being layout out, but if I adjust the grid constraints at runtime, the layout is not adjusted (but the content on the grids are, for example the text printing the current column). The Grid composable is being recomposed, but the parentData of the measurable always contains the grid data from the first composition. Does anyone have any ideas on getting the current grid childrens Modifier data so the grid positioning can be dynamic? Heres my grid code for reference: https://pastebin.com/pbg5WQ4p
a
This might not be the issue, but it looks like
GridData
’s `equals`/`hashcode` doesn’t check for
column
and
row
?
e
That would definitely be it, thank you! I took some code from a grid layout that didn’t have row and column placement, and forgot to update the equals/hashcode lol
a
Nice, that fixed it then?
e
Yup