Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions packages/block-library/src/columns/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,12 @@ function ColumnsEditContainer( { attributes, setAttributes, clientId } ) {
}

function Placeholder( { clientId, name, setAttributes } ) {
const { blockType, defaultVariation, variations } = useSelect(
const { blockType, variations } = useSelect(
( select ) => {
const {
getBlockVariations,
getBlockType,
getDefaultBlockVariation,
} = select( blocksStore );
const { getBlockVariations, getBlockType } = select( blocksStore );

return {
blockType: getBlockType( name ),
defaultVariation: getDefaultBlockVariation( name, 'block' ),
variations: getBlockVariations( name, 'block' ),
};
},
Expand All @@ -293,7 +288,7 @@ function Placeholder( { clientId, name, setAttributes } ) {
label={ blockType?.title }
variations={ variations }
instructions={ __( 'Divide into columns. Select a layout:' ) }
onSelect={ ( nextVariation = defaultVariation ) => {
onSelect={ ( nextVariation ) => {
if ( nextVariation.attributes ) {
setAttributes( nextVariation.attributes );
}
Expand All @@ -307,7 +302,6 @@ function Placeholder( { clientId, name, setAttributes } ) {
);
}
} }
allowSkip
/>
</div>
);
Expand Down
Loading