diff --git a/packages/dataviews/src/view-table.js b/packages/dataviews/src/view-table.js
index c77323d3c796d3..3b4b634df6ea08 100644
--- a/packages/dataviews/src/view-table.js
+++ b/packages/dataviews/src/view-table.js
@@ -237,12 +237,39 @@ function TableRow( {
data,
} ) {
const hasPossibleBulkAction = useHasAPossibleBulkAction( actions, item );
+ const isSelected = selection.includes( id );
return (
{
+ if ( event.ctrlKey || event.metaKey ) {
+ event.stopPropagation();
+ event.preventDefault();
+ if ( ! isSelected ) {
+ onSelectionChange(
+ data.filter( ( _item ) => {
+ const itemId = getItemId?.( _item );
+ return (
+ itemId === id ||
+ selection.includes( itemId )
+ );
+ } )
+ );
+ } else {
+ onSelectionChange(
+ data.filter( ( _item ) => {
+ const itemId = getItemId?.( _item );
+ return (
+ itemId !== id &&
+ selection.includes( itemId )
+ );
+ } )
+ );
+ }
+ }
+ } }
>
{ hasBulkActions && (
|