Skip to content

Commit

Permalink
fix: table row actions not disabled in the table mode context menu wh…
Browse files Browse the repository at this point in the history
…en having an empty document
  • Loading branch information
josdejong committed Mar 13, 2024
1 parent 5382e1c commit 7123249
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,39 +202,39 @@ export default function ({
icon: faPen,
text: 'Edit row',
title: 'Edit the current row',
disabled: readOnly || !hasSelectionContents
disabled: readOnly || !hasSelection || !hasJson
},
{
type: 'button',
onClick: () => onDuplicateRow(),
icon: faClone,
text: 'Duplicate row',
title: 'Duplicate the current row',
disabled: readOnly || !hasSelection
disabled: readOnly || !hasSelection || !hasJson
},
{
type: 'button',
onClick: () => onInsertBeforeRow(),
icon: faPlus,
text: 'Insert before',
title: 'Insert a row before the current row',
disabled: readOnly || !hasSelection
disabled: readOnly || !hasSelection || !hasJson
},
{
type: 'button',
onClick: () => onInsertAfterRow(),
icon: faPlus,
text: 'Insert after',
title: 'Insert a row after the current row',
disabled: readOnly || !hasSelection
disabled: readOnly || !hasSelection || !hasJson
},
{
type: 'button',
onClick: () => onRemoveRow(),
icon: faTrashCan,
text: 'Remove row',
title: 'Remove current row',
disabled: readOnly || !hasSelection
disabled: readOnly || !hasSelection || !hasJson
}
]
}
Expand Down

0 comments on commit 7123249

Please sign in to comment.