Skip to content

Commit

Permalink
pass ref in the right way
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed May 10, 2024
1 parent 6f6f6f9 commit 82fb83c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/block-editor/src/components/block-popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,17 @@ function BlockPopover(

export const PrivateBlockPopover = forwardRef( BlockPopover );

const PublicBlockPopover = ( {
clientId,
bottomClientId,
children,
...props
} ) => (
const PublicBlockPopover = (
{ clientId, bottomClientId, children, ...props },
ref
) => (
<PrivateBlockPopover
{ ...props }
bottomClientId={ bottomClientId }
clientId={ clientId }
__unstableContentRef={ undefined }
__unstablePopoverSlot={ undefined }
ref={ ref }
>
{ children }
</PrivateBlockPopover>
Expand All @@ -174,4 +173,4 @@ const PublicBlockPopover = ( {
/**
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-popover/README.md
*/
export default PublicBlockPopover;
export default forwardRef( PublicBlockPopover );

0 comments on commit 82fb83c

Please sign in to comment.