From 7123249d28eecae4e9a6875760d63fb47fabbcdd Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Wed, 13 Mar 2024 12:04:32 +0100 Subject: [PATCH] fix: table row actions not disabled in the table mode context menu when having an empty document --- .../contextmenu/createTableContextMenuItems.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/components/modes/tablemode/contextmenu/createTableContextMenuItems.ts b/src/lib/components/modes/tablemode/contextmenu/createTableContextMenuItems.ts index beb44d23..f510f525 100644 --- a/src/lib/components/modes/tablemode/contextmenu/createTableContextMenuItems.ts +++ b/src/lib/components/modes/tablemode/contextmenu/createTableContextMenuItems.ts @@ -202,7 +202,7 @@ export default function ({ icon: faPen, text: 'Edit row', title: 'Edit the current row', - disabled: readOnly || !hasSelectionContents + disabled: readOnly || !hasSelection || !hasJson }, { type: 'button', @@ -210,7 +210,7 @@ export default function ({ icon: faClone, text: 'Duplicate row', title: 'Duplicate the current row', - disabled: readOnly || !hasSelection + disabled: readOnly || !hasSelection || !hasJson }, { type: 'button', @@ -218,7 +218,7 @@ export default function ({ icon: faPlus, text: 'Insert before', title: 'Insert a row before the current row', - disabled: readOnly || !hasSelection + disabled: readOnly || !hasSelection || !hasJson }, { type: 'button', @@ -226,7 +226,7 @@ export default function ({ icon: faPlus, text: 'Insert after', title: 'Insert a row after the current row', - disabled: readOnly || !hasSelection + disabled: readOnly || !hasSelection || !hasJson }, { type: 'button', @@ -234,7 +234,7 @@ export default function ({ icon: faTrashCan, text: 'Remove row', title: 'Remove current row', - disabled: readOnly || !hasSelection + disabled: readOnly || !hasSelection || !hasJson } ] }