Skip to content

Commit

Permalink
Pattern Explorer: Pass 'rootClientId' to the pattern list (#60014)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: dsas <[email protected]>
  • Loading branch information
4 people authored and tellthemachines committed Apr 9, 2024
1 parent f9a655d commit b2a0853
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function PatternsExplorer( { initialCategory, rootClientId } ) {
selectedCategory={ selectedCategory }
patternCategories={ patternCategories }
patternSourceFilter={ patternSourceFilter }
rootClientId={ rootClientId }
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ function PatternsListHeader( { filterValue, filteredBlockPatternsLength } ) {
);
}

function PatternList( { searchValue, selectedCategory, patternCategories } ) {
function PatternList( {
searchValue,
selectedCategory,
patternCategories,
rootClientId,
} ) {
const container = useRef();
const debouncedSpeak = useDebounce( speak, 500 );
const [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {
rootClientId,
shouldFocusBlock: true,
} );
const [ patterns, , onClickPattern ] = usePatternsState(
Expand Down

0 comments on commit b2a0853

Please sign in to comment.