diff --git a/packages/block-library/src/column/edit.js b/packages/block-library/src/column/edit.js index 1664bff4ffeb59..e815731970d320 100644 --- a/packages/block-library/src/column/edit.js +++ b/packages/block-library/src/column/edit.js @@ -23,6 +23,7 @@ function ColumnEdit( { setAttributes, updateAlignment, hasChildBlocks, + columnsParentLock, } ) { const { verticalAlignment, width } = attributes; @@ -60,7 +61,11 @@ function ColumnEdit( { { const { clientId } = ownProps; - const { getBlockOrder } = select( 'core/block-editor' ); + const { getBlockOrder, getBlockRootClientId, getTemplateLock } = select( + 'core/block-editor' + ); + + const parentColumnsId = getBlockRootClientId( clientId ); + const parentOfColumnsId = getBlockRootClientId( parentColumnsId ); + const columnsParentLock = parentOfColumnsId + ? getTemplateLock( parentOfColumnsId ) + : getTemplateLock(); return { hasChildBlocks: getBlockOrder( clientId ).length > 0, + columnsParentLock: + columnsParentLock !== undefined ? columnsParentLock : false, }; } ), withDispatch( ( dispatch, ownProps, registry ) => {