mirror of
https://github.com/zadam/trilium.git
synced 2025-10-08 22:49:12 +08:00
fix(views/table): some context menu items active when they shouldn't
This commit is contained in:
parent
f3350bc8f5
commit
169d1203c2
1 changed files with 2 additions and 0 deletions
|
@ -82,6 +82,7 @@ function showColumnContextMenu(_e: UIEvent, column: ColumnComponent, tabulator:
|
||||||
{
|
{
|
||||||
title: t("table_view.add-column-to-the-left"),
|
title: t("table_view.add-column-to-the-left"),
|
||||||
uiIcon: "bx bx-horizontal-left",
|
uiIcon: "bx bx-horizontal-left",
|
||||||
|
enabled: !column.getDefinition().frozen,
|
||||||
handler: () => getParentComponent(e)?.triggerCommand("addNewTableColumn", {
|
handler: () => getParentComponent(e)?.triggerCommand("addNewTableColumn", {
|
||||||
referenceColumn: column
|
referenceColumn: column
|
||||||
})
|
})
|
||||||
|
@ -89,6 +90,7 @@ function showColumnContextMenu(_e: UIEvent, column: ColumnComponent, tabulator:
|
||||||
{
|
{
|
||||||
title: t("table_view.edit-column"),
|
title: t("table_view.edit-column"),
|
||||||
uiIcon: "bx bx-edit",
|
uiIcon: "bx bx-edit",
|
||||||
|
enabled: !!column.getField() && column.getField() !== "title",
|
||||||
handler: () => getParentComponent(e)?.triggerCommand("addNewTableColumn", {
|
handler: () => getParentComponent(e)?.triggerCommand("addNewTableColumn", {
|
||||||
columnToEdit: column
|
columnToEdit: column
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue