Skip to content

Commit

Permalink
Block alignment controls: don't remount the block when alignments change
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Feb 17, 2023
1 parent 0b5ca22 commit 8cd0c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/align.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function addAttribute( settings ) {
*/
export const withToolbarControls = createHigherOrderComponent(
( BlockEdit ) => ( props ) => {
const blockEdit = <BlockEdit { ...props } />;
const blockEdit = <BlockEdit key="edit" { ...props } />;
const { name: blockName } = props;
// Compute the block valid alignments by taking into account,
// if the theme supports wide alignments or not and the layout's
Expand Down

0 comments on commit 8cd0c25

Please sign in to comment.