Skip to content

Commit 6690e85

Browse files
committed
Add fillMaxSizeStretch to BoxWithConstraints on JS DOM so it gets the width and height correctly
1 parent 8c33811 commit 6690e85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compose-multiplatform-common/src/jsMain/kotlin/com/huanshankeji/compose/foundation/layout/ext/BoxWithConstraints.js.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ actual fun BoxWithConstraints(
2626
onDispose { clientSize = null }
2727
}
2828
}
29-
}.then(modifier),
29+
}.fillMaxSizeStretch()
30+
.then(modifier),
3031
contentAlignment
3132
) {
3233
clientSize?.let {

0 commit comments

Comments
 (0)