mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 02:28:57 +01:00
feat(views/table): hide context menu for small columns
This commit is contained in:
parent
d5327b3b4a
commit
ae9b2c08a9
@ -1,11 +1,12 @@
|
|||||||
import type { CellComponent, MenuObject, Tabulator } from "tabulator-tables";
|
import type { CellComponent, ColumnComponent, MenuObject, Tabulator } from "tabulator-tables";
|
||||||
|
|
||||||
export function applyHeaderMenu(columns) {
|
export function applyHeaderMenu(columns: ColumnComponent[]) {
|
||||||
//apply header menu to each column
|
|
||||||
for (let column of columns) {
|
for (let column of columns) {
|
||||||
|
if (column.headerSort !== false) {
|
||||||
column.headerMenu = headerMenu;
|
column.headerMenu = headerMenu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function headerMenu(this: Tabulator) {
|
function headerMenu(this: Tabulator) {
|
||||||
const menu: MenuObject<CellComponent>[] = [];
|
const menu: MenuObject<CellComponent>[] = [];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user