From d02331c2d22a636f20818dd311f9cc8a48b9f82d Mon Sep 17 00:00:00 2001 From: Eshaan Dabasiya <76681468+im3dabasia@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:00:46 +0530 Subject: [PATCH] Page List Block: Add dropdown menu props to ToolsPanel component (#68012) Co-authored-by: im3dabasia Co-authored-by: fabiankaegy --- packages/block-library/src/page-list/edit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/block-library/src/page-list/edit.js b/packages/block-library/src/page-list/edit.js index d9fee67968ac08..00d96e9ba307bd 100644 --- a/packages/block-library/src/page-list/edit.js +++ b/packages/block-library/src/page-list/edit.js @@ -38,6 +38,7 @@ import { convertDescription, ConvertToLinksModal, } from './convert-to-links-modal'; +import { useToolsPanelDropdownMenuProps } from '../utils/hooks'; // We only show the edit option when page count is <= MAX_PAGE_COUNT // Performance of Navigation Links is not good past this value. @@ -124,6 +125,7 @@ export default function PageListEdit( { const [ isOpen, setOpen ] = useState( false ); const openModal = useCallback( () => setOpen( true ), [] ); const closeModal = () => setOpen( false ); + const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const { records: pages, hasResolved: hasResolvedPages } = useEntityRecords( 'postType', @@ -326,6 +328,7 @@ export default function PageListEdit( { resetAll={ () => { setAttributes( { parentPageID: 0 } ); } } + dropdownMenuProps={ dropdownMenuProps } > { pagesTree.length > 0 && (