Skip to content

Commit

Permalink
Inserter: Fix InserterListbox rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Nov 6, 2024
1 parent 39d6d4c commit 3e8a81a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/block-editor/src/components/inserter-listbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import { Composite } from '@wordpress/components';
import { Fragment } from '@wordpress/element';

/**
* Internal dependencies
Expand All @@ -11,9 +12,17 @@ export { default as InserterListboxGroup } from './group';
export { default as InserterListboxRow } from './row';
export { default as InserterListboxItem } from './item';

function InserterListBoxWrapper( { key, children } ) {
return <Fragment key={ key }>{ children }</Fragment>;
}

function InserterListbox( { children } ) {
return (
<Composite focusShift focusWrap="horizontal" render={ <></> }>
<Composite
focusShift
focusWrap="horizontal"
render={ InserterListBoxWrapper }
>
{ children }
</Composite>
);
Expand Down

0 comments on commit 3e8a81a

Please sign in to comment.