Skip to content

Commit

Permalink
Gallery: Set the 'defaultBlock' setting for inner blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Feb 19, 2024
1 parent d673498 commit f55788b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const MOBILE_CONTROL_PROPS_RANGE_CONTROL = Platform.isNative
? { type: 'stepper' }
: {};

const DEFAULT_BLOCK = { name: 'core/image' };
const EMPTY_ARRAY = [];

function GalleryEdit( props ) {
Expand Down Expand Up @@ -496,6 +497,7 @@ function GalleryEdit( props ) {
};

const innerBlocksProps = useInnerBlocksProps( blockProps, {
defaultBlock: DEFAULT_BLOCK,
orientation: 'horizontal',
renderAppender: false,
...nativeInnerBlockProps,
Expand Down

0 comments on commit f55788b

Please sign in to comment.