Skip to content

Build your personal knowledge base with Trilium Notes

feat(views/table): improve column context menu

Elian Doran08e08d892059
diff --git a/apps/client/src/widgets/view_widgets/table_view/context_menu.ts b/apps/client/src/widgets/view_widgets/table_view/context_menu.ts
index e7258aa032..935b8246bb 100644
--- a/apps/client/src/widgets/view_widgets/table_view/context_menu.ts
+++ b/apps/client/src/widgets/view_widgets/table_view/context_menu.ts
@@ -21,20 +21,10 @@ function showColumnContextMenu(_e: UIEvent, column: ColumnComponent, tabulator:
contextMenu.show({
items: [
- {
- title: `Hide column ${title}`,
- handler: () => column.hide()
- },
- {
- title: "Show/hide columns",
- items: buildColumnItems()
- },
- {
- title: "----"
- },
{
title: `Sort by ${title}`,
enabled: !!field,
+ uiIcon: "bx bx-sort-alt-2",
items: [
{
title: "Ascending",
@@ -63,8 +53,22 @@ function showColumnContextMenu(_e: UIEvent, column: ColumnComponent, tabulator:
{
title: "Clear sorting",
enabled: sorters.length > 0,
+ uiIcon: "bx bx-empty",
handler: () => tabulator.clearSort()
- }
+ },
+ {
+ title: "----"
+ },
+ {
+ title: `Hide column ${title}`,
+ uiIcon: "bx bx-hide",
+ handler: () => column.hide()
+ },
+ {
+ title: "Show/hide columns",
+ uiIcon: "bx bx-empty",
+ items: buildColumnItems()
+ },
],
selectMenuItemHandler() {},
x: e.pageX,