diff --git a/packages/block-editor/src/components/block-navigation/tree.js b/packages/block-editor/src/components/block-navigation/tree.js index 0931c667f8612..f8e64233935b6 100644 --- a/packages/block-editor/src/components/block-navigation/tree.js +++ b/packages/block-editor/src/components/block-navigation/tree.js @@ -26,7 +26,6 @@ const noop = () => {}; * @param {Object} props Components props. * @param {Array} props.blocks Custom subset of block client IDs to be used instead of the default hierarchy. * @param {Function} props.onSelect Block selection callback. - * @param {Array} props.selectedBlockClientIds The client IDs of the (single or multi-) selected blocks. * @param {boolean} props.showNestedBlocks Flag to enable displaying nested blocks. * @param {boolean} props.showOnlyCurrentHierarchy Flag to limit the list to the current hierarchy of blocks. * @param {boolean} props.__experimentalFeatures Flag to enable experimental features. @@ -36,7 +35,6 @@ export default function BlockNavigationTree( { blocks, showOnlyCurrentHierarchy, onSelect = noop, - selectedBlockClientIds, __experimentalFeatures, __experimentalPersistentListViewFeatures, ...props @@ -44,7 +42,6 @@ export default function BlockNavigationTree( { const { clientIdsTree, selectedClientIds } = useBlockNavigationClientIds( blocks, showOnlyCurrentHierarchy, - selectedBlockClientIds, __experimentalPersistentListViewFeatures ); const { selectBlock } = useDispatch( blockEditorStore ); diff --git a/packages/block-editor/src/components/block-navigation/use-block-navigation-client-ids.js b/packages/block-editor/src/components/block-navigation/use-block-navigation-client-ids.js index e854ad99d9fac..e68cadf582de8 100644 --- a/packages/block-editor/src/components/block-navigation/use-block-navigation-client-ids.js +++ b/packages/block-editor/src/components/block-navigation/use-block-navigation-client-ids.js @@ -11,7 +11,6 @@ import { isClientIdSelected } from './utils'; import { store as blockEditorStore } from '../../store'; const useBlockNavigationSelectedClientIds = ( - selectedBlockClientIds, __experimentalPersistentListViewFeatures ) => useSelect( @@ -21,17 +20,13 @@ const useBlockNavigationSelectedClientIds = ( getSelectedBlockClientIds, } = select( blockEditorStore ); - if ( selectedBlockClientIds ) { - return selectedBlockClientIds; - } - if ( __experimentalPersistentListViewFeatures ) { return getSelectedBlockClientIds(); } return getSelectedBlockClientId(); }, - [ selectedBlockClientIds, __experimentalPersistentListViewFeatures ] + [ __experimentalPersistentListViewFeatures ] ); const useBlockNavigationClientIdsTree = ( @@ -79,11 +74,9 @@ const useBlockNavigationClientIdsTree = ( export default function useBlockNavigationClientIds( blocks, showOnlyCurrentHierarchy, - selectedBlockClientIds, __experimentalPersistentListViewFeatures ) { const selectedClientIds = useBlockNavigationSelectedClientIds( - selectedBlockClientIds, __experimentalPersistentListViewFeatures ); const clientIdsTree = useBlockNavigationClientIdsTree(