Skip to content

Commit

Permalink
Docs: Use 'key' in 'editor.BlockEdit' filter code examples (#58119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Jan 23, 2024
1 parent 9e67078 commit 4c96f5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,13 @@ export const withBookQueryControls = ( BlockEdit ) => ( props ) => {
// function to handle that.
return isMyBooksVariation( props ) ? (
<>
<BlockEdit { ...props } />
<BlockEdit key="edit" { ...props } />
<InspectorControls>
<BookAuthorSelector /> { /** Our custom component */ }
</InspectorControls>
</>
) : (
<BlockEdit { ...props } />
<BlockEdit key="edit" { ...props } />
);
};

Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/filters/block-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const withMyPluginControls = createHigherOrderComponent( ( BlockEdit ) => {
return ( props ) => {
return (
<>
<BlockEdit { ...props } />
<BlockEdit key="edit" { ...props } />
<InspectorControls>
<PanelBody>My custom control</PanelBody>
</InspectorControls>
Expand Down

0 comments on commit 4c96f5e

Please sign in to comment.