Skip to content

Commit

Permalink
Fix default width for flow children
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Feb 23, 2024
1 parent 8498d43 commit c0255a0
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ export default function ChildLayoutControl( {
selectedValue = 'fixedNoShrink';
} else if ( selfAlign === 'fit' ) {
selectedValue = 'fit';
} else {
} else if ( parentLayoutType === 'constrained' ) {
selectedValue = 'content';
} else {
selectedValue = 'fill';
}
} else if (
parentLayoutType === 'flex' &&
Expand Down Expand Up @@ -256,10 +258,10 @@ export default function ChildLayoutControl( {
...childLayout,
[ widthProp ]: key,
} );
onChangeAlignment( null );
onChangeAlignment( undefined );
} else {
onChange( { [ widthProp ]: key } );
onChangeAlignment( null );
onChangeAlignment( undefined );
}
} else if ( parentLayoutType === 'flex' ) {
onChange( {
Expand Down

0 comments on commit c0255a0

Please sign in to comment.