Skip to content

Commit

Permalink
Merge branch 'fix/do-not-replace-blocks-on-save' of github.com:WordPr…
Browse files Browse the repository at this point in the history
…ess/gutenberg into test/nav-screen-status
  • Loading branch information
draganescu committed May 29, 2020
2 parents cfcecf5 + cba04f8 commit ead8ab2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class BlockList extends Component {
this.extraData = {
parentWidth: this.props.parentWidth,
renderFooterAppender: this.props.renderFooterAppender,
onDeleteBlock: this.props.onDeleteBlock,
};
this.renderItem = this.renderItem.bind( this );
this.renderBlockListFooter = this.renderBlockListFooter.bind( this );
Expand Down Expand Up @@ -107,14 +108,16 @@ export class BlockList extends Component {
}

getExtraData() {
const { parentWidth, renderFooterAppender } = this.props;
const { parentWidth, renderFooterAppender, onDeleteBlock } = this.props;
if (
this.extraData.parentWidth !== parentWidth ||
this.extraData.renderFooterAppender !== renderFooterAppender
this.extraData.renderFooterAppender !== renderFooterAppender ||
this.extraData.onDeleteBlock !== onDeleteBlock
) {
this.extraData = {
parentWidth,
renderFooterAppender,
onDeleteBlock,
};
}
return this.extraData;
Expand Down
5 changes: 3 additions & 2 deletions packages/edit-navigation/src/components/menus-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import MenuEditor from '../menu-editor';
export default function MenusEditor( { blockEditorSettings } ) {
const { menus, hasLoadedMenus } = useSelect( ( select ) => {
const { getMenus, hasFinishedResolution } = select( 'core' );
const query = { per_page: -1 };
return {
menus: getMenus(),
hasLoadedMenus: hasFinishedResolution( 'getMenus' ),
menus: getMenus( query ),
hasLoadedMenus: hasFinishedResolution( 'getMenus', [ query ] ),
};
}, [] );

Expand Down

0 comments on commit ead8ab2

Please sign in to comment.