Skip to content

Commit

Permalink
Block Inserter Listbox: do not use Composite store (#65042)
Browse files Browse the repository at this point in the history
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
  • Loading branch information
3 people committed Sep 4, 2024
1 parent 1a1e3a9 commit be1617d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/block-editor/src/components/inserter-listbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@ export { default as InserterListboxGroup } from './group';
export { default as InserterListboxRow } from './row';
export { default as InserterListboxItem } from './item';

const { CompositeV2: Composite, useCompositeStoreV2: useCompositeStore } =
unlock( componentsPrivateApis );
const { CompositeV2: Composite } = unlock( componentsPrivateApis );

function InserterListbox( { children } ) {
const store = useCompositeStore( {
focusShift: true,
focusWrap: 'horizontal',
} );

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

0 comments on commit be1617d

Please sign in to comment.