feat: optimize width calculation in ItemRow for immediate recomposition on per-column changes
This commit is contained in:
+2
-1
@@ -986,7 +986,8 @@ fun ItemRow(
|
|||||||
remember(itemWithValues.values) {
|
remember(itemWithValues.values) {
|
||||||
itemWithValues.values.associateBy { it.fieldId }
|
itemWithValues.values.associateBy { it.fieldId }
|
||||||
}
|
}
|
||||||
val widths = remember(fields, fieldWidths) { fields.map { fieldWidths[it.id] ?: 150.dp } }
|
// Build widths list directly from the SnapshotStateMap so per-column changes recompose rows immediately
|
||||||
|
val widths = fields.map { fieldWidths[it.id] ?: 150.dp }
|
||||||
|
|
||||||
EqualHeightRow(
|
EqualHeightRow(
|
||||||
widths = widths,
|
widths = widths,
|
||||||
|
|||||||
Reference in New Issue
Block a user