fix(views/table): some context menu items active when they shouldn't

This commit is contained in:
Elian Doran 2025-07-15 22:25:49 +03:00
parent f3350bc8f5
commit 169d1203c2
No known key found for this signature in database

View file

@ -82,6 +82,7 @@ function showColumnContextMenu(_e: UIEvent, column: ColumnComponent, tabulator:
{
title: t("table_view.add-column-to-the-left"),
uiIcon: "bx bx-horizontal-left",
enabled: !column.getDefinition().frozen,
handler: () => getParentComponent(e)?.triggerCommand("addNewTableColumn", {
referenceColumn: column
})
@ -89,6 +90,7 @@ function showColumnContextMenu(_e: UIEvent, column: ColumnComponent, tabulator:
{
title: t("table_view.edit-column"),
uiIcon: "bx bx-edit",
enabled: !!column.getField() && column.getField() !== "title",
handler: () => getParentComponent(e)?.triggerCommand("addNewTableColumn", {
columnToEdit: column
})