Skip to content

Commit

Permalink
make the zoom out inserters work for sections inside the section root (
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu authored Apr 22, 2024
1 parent c817886 commit 854756a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ import { useEffect, useState } from '@wordpress/element';
import BlockPopoverInbetween from '../block-popover/inbetween';
import { store as blockEditorStore } from '../../store';
import Inserter from '../inserter';
import { unlock } from '../../lock-unlock';

function ZoomOutModeInserters( { __unstableContentRef } ) {
const [ isReady, setIsReady ] = useState( false );
const blockOrder = useSelect( ( select ) => {
return select( blockEditorStore ).getBlockOrder();
const { sectionRootClientId } = unlock(
select( blockEditorStore ).getSettings()
);
return select( blockEditorStore ).getBlockOrder( sectionRootClientId );
}, [] );

// Defer the initial rendering to avoid the jumps due to the animation.
Expand Down

0 comments on commit 854756a

Please sign in to comment.