File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
packages/dataviews/src/components/dataviews-item-actions Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { __ } from '@wordpress/i18n';
1616import { useMemo , useState } from '@wordpress/element' ;
1717import { moreVertical } from '@wordpress/icons' ;
1818import { useRegistry } from '@wordpress/data' ;
19+ import { useViewportMatch } from '@wordpress/compose' ;
1920
2021/**
2122 * Internal dependencies
@@ -259,6 +260,12 @@ function PrimaryActions< Item >( {
259260 registry,
260261} : PrimaryActionsProps < Item > ) {
261262 const [ activeModalAction , setActiveModalAction ] = useState ( null as any ) ;
263+ const isMobileViewport = useViewportMatch ( 'medium' , '<' ) ;
264+
265+ if ( isMobileViewport ) {
266+ return null ;
267+ }
268+
262269 if ( ! Array . isArray ( actions ) || actions . length === 0 ) {
263270 return null ;
264271 }
You can’t perform that action at this time.
0 commit comments