Skip to content

Commit

Permalink
Remove columns allowedChlidBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
JesserH committed Jan 22, 2021
1 parent 6a37644 commit 0a1aa6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 1 addition & 4 deletions packages/block-library/src/columns/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"attributes": {
"verticalAlignment": {
"type": "string"
},
"allowedChildBlocks": {
"type": "array"
}
}
},
"supports": {
"anchor": true,
Expand Down
8 changes: 1 addition & 7 deletions packages/block-library/src/columns/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function ColumnsEditContainer( {
updateColumns,
clientId,
} ) {
const { verticalAlignment, allowedChildBlocks } = attributes;
const { verticalAlignment } = attributes;

const { count } = useSelect(
( select ) => {
Expand All @@ -72,7 +72,6 @@ function ColumnsEditContainer( {
} );
const innerBlocksProps = useInnerBlocksProps( blockProps, {
allowedBlocks: ALLOWED_BLOCKS,
allowedChildBlocks,
orientation: 'horizontal',
renderAppender: false,
} );
Expand Down Expand Up @@ -143,7 +142,6 @@ const ColumnsEditContainerWrapper = withDispatch(
*/
updateColumns( previousColumns, newColumns ) {
const { clientId } = ownProps;
const { allowedChildBlocks } = ownProps.attributes;
const { replaceInnerBlocks } = dispatch( 'core/block-editor' );
const { getBlocks } = registry.select( 'core/block-editor' );

Expand Down Expand Up @@ -172,17 +170,13 @@ const ColumnsEditContainerWrapper = withDispatch(
...times( newColumns - previousColumns, () => {
return createBlock( 'core/column', {
width: newColumnWidth,
allowedBlocks: allowedChildBlocks,
} );
} ),
];
} else if ( isAddingColumn ) {
innerBlocks = [
...innerBlocks,
...times( newColumns - previousColumns, () => {
return createBlock( 'core/column', {
allowedBlocks: allowedChildBlocks,
} );
} ),
];
} else {
Expand Down

0 comments on commit 0a1aa6f

Please sign in to comment.