Skip to content

Commit

Permalink
Renamed parent client id array to selectedBlockParentClientIds
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Oct 25, 2021
1 parent cb18edc commit 32ab7ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/block-editor/src/components/list-view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function ListView(
const {
clientIdsTree,
draggedClientIds,
selectedBlockParentIds,
selectedBlockParentClientIds,
} = useListViewClientIds( blocks );
const { selectBlock } = useDispatch( blockEditorStore );
const selectEditorBlock = useCallback(
Expand Down Expand Up @@ -150,10 +150,10 @@ function ListView(
useEffect( () => {
if (
! hasFocus &&
Array.isArray( selectedBlockParentIds ) &&
selectedBlockParentIds.length
Array.isArray( selectedBlockParentClientIds ) &&
selectedBlockParentClientIds.length
) {
selectedBlockParentIds.forEach( ( clientId ) => {
selectedBlockParentClientIds.forEach( ( clientId ) => {
if ( ! expandedState[ clientId ] ) {
setExpandedState( {
type: 'expand',
Expand All @@ -162,7 +162,7 @@ function ListView(
}
} );
}
}, [ hasFocus, selectedBlockParentIds ] );
}, [ hasFocus, selectedBlockParentClientIds ] );

return (
<AsyncModeProvider value={ true }>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function useListViewClientIds( blocks ) {
return {
draggedClientIds: getDraggedBlockClientIds(),
clientIdsTree: blocks ? blocks : __unstableGetClientIdsTree(),
selectedBlockParentIds: getBlockParents(
selectedBlockParentClientIds: getBlockParents(
selectedBlockClientIds[ 0 ],
false
),
Expand Down

0 comments on commit 32ab7ae

Please sign in to comment.