File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed
compass-connections-navigation/src/virtual-list
compass-crud/src/components Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import {
1515 mergeProps ,
1616 useFocusRing ,
1717 useId ,
18- type ContextMenuItem ,
1918} from '@mongodb-js/compass-components' ;
2019import { type SidebarActionableItem , type SidebarTreeItem } from '../tree-data' ;
2120import { type Actions } from '../constants' ;
Original file line number Diff line number Diff line change @@ -67,17 +67,19 @@ export function useDocumentItemContextMenu({
6767 : undefined ,
6868 ] ,
6969 } ,
70- {
71- telemetryLabel : 'Document Item Delete' ,
72- items : [
73- {
74- label : 'Delete document' ,
75- onAction : ( ) => {
76- doc . markForDeletion ( ) ;
77- } ,
78- } ,
79- ] ,
80- } ,
70+ isEditable
71+ ? {
72+ telemetryLabel : 'Document Item Delete' ,
73+ items : [
74+ {
75+ label : 'Delete document' ,
76+ onAction : ( ) => {
77+ doc . markForDeletion ( ) ;
78+ } ,
79+ } ,
80+ ] ,
81+ }
82+ : undefined ,
8183 ] ,
8284 [
8385 doc ,
You can’t perform that action at this time.
0 commit comments