From d95e570fcbb681fe29b2aeeafc59dc906a91c9d1 Mon Sep 17 00:00:00 2001 From: Ella Date: Wed, 18 Oct 2023 10:55:25 +0300 Subject: [PATCH] Update field render --- packages/edit-site/src/components/page-pages/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/edit-site/src/components/page-pages/index.js b/packages/edit-site/src/components/page-pages/index.js index de7c47a877e483..22a2ef15e57038 100644 --- a/packages/edit-site/src/components/page-pages/index.js +++ b/packages/edit-site/src/components/page-pages/index.js @@ -117,7 +117,7 @@ export default function PagePages() { header: __( 'Title' ), id: 'title', getValue: ( { item } ) => item.title?.rendered || item.slug, - render: ( { item } ) => { + render: ( { item, view: { type } } ) => { return ( @@ -129,8 +129,7 @@ export default function PagePages() { } } onClick={ ( event ) => { if ( - viewTypeSupportsMap[ view.type ] - .preview + viewTypeSupportsMap[ type ].preview ) { event.preventDefault(); setSelection( [ item.id ] ); @@ -208,7 +207,7 @@ export default function PagePages() { enableSorting: false, }, ], - [ postStatuses, authors, view.type ] + [ postStatuses, authors ] ); const trashPostAction = useTrashPostAction();