{
+ if (e.key === 'Escape') {
+ clearSelectedRows?.()
+ }
+ }}
+ >
= ({
instance={instance}
key={row.id}
changes={changes}
- contextMenuDisabled={hasRunningExperiment}
+ hasRunningExperiment={hasRunningExperiment}
projectHasCheckpoints={hasCheckpoints}
batchRowSelection={batchRowSelection}
/>
diff --git a/webview/src/experiments/components/table/interfaces.ts b/webview/src/experiments/components/table/interfaces.ts
index 02320bae31..8dc2626d3e 100644
--- a/webview/src/experiments/components/table/interfaces.ts
+++ b/webview/src/experiments/components/table/interfaces.ts
@@ -16,6 +16,7 @@ export interface WithChanges {
export interface RowProp {
row: Row
contextMenuDisabled?: boolean
+ hasRunningExperiment?: boolean
projectHasCheckpoints?: boolean
}
diff --git a/webview/src/shared/components/messagesMenu/MessagesMenuOption.tsx b/webview/src/shared/components/messagesMenu/MessagesMenuOption.tsx
index ff4ff5f1d0..f8cf4087b2 100644
--- a/webview/src/shared/components/messagesMenu/MessagesMenuOption.tsx
+++ b/webview/src/shared/components/messagesMenu/MessagesMenuOption.tsx
@@ -7,16 +7,17 @@ import { sendMessage } from '../../vscode'
export interface MessagesMenuOptionProps {
id: string
label: string
- message: MessageFromWebview
+ message?: MessageFromWebview
hidden?: boolean
divider?: boolean
+ keyboardShortcut?: string
}
export const MessagesMenuOption: React.FC<
MessagesMenuOptionProps & { onOptionSelected?: () => void }
-> = ({ label, message, divider, onOptionSelected }) => {
+> = ({ label, message, divider, onOptionSelected, keyboardShortcut }) => {
const sendTheMessage = () => {
- sendMessage(message)
+ !!message && sendMessage(message)
onOptionSelected?.()
}
@@ -44,6 +45,7 @@ export const MessagesMenuOption: React.FC<
>
{label}