From fe2b12ad12a3d193f7ffce11dc1f5704c7e9bbc1 Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Mon, 16 Dec 2024 13:20:05 +0530 Subject: [PATCH] fix: use dropdown menu props --- 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 d9fee67968ac0..00d96e9ba307b 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 && (