mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
feat(views/table): hide column titles for small ones
This commit is contained in:
parent
ae9b2c08a9
commit
513636e1e0
@ -64,6 +64,7 @@ export async function buildData(parentNote: FNote, info: PromotedAttributeInform
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function buildColumnDefinitions(info: PromotedAttributeInformation[]) {
|
export function buildColumnDefinitions(info: PromotedAttributeInformation[]) {
|
||||||
|
const emptyTitleFormatter = () => "";
|
||||||
const columnDefs: ColumnDefinition[] = [
|
const columnDefs: ColumnDefinition[] = [
|
||||||
{
|
{
|
||||||
title: "#",
|
title: "#",
|
||||||
@ -75,7 +76,8 @@ export function buildColumnDefinitions(info: PromotedAttributeInformation[]) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "iconClass",
|
field: "iconClass",
|
||||||
title: "Icon",
|
title: "Note icon",
|
||||||
|
titleFormatter: emptyTitleFormatter,
|
||||||
width: 40,
|
width: 40,
|
||||||
headerSort: false,
|
headerSort: false,
|
||||||
hozAlign: "center",
|
hozAlign: "center",
|
||||||
@ -109,11 +111,12 @@ export function buildColumnDefinitions(info: PromotedAttributeInformation[]) {
|
|||||||
|
|
||||||
// End actions
|
// End actions
|
||||||
columnDefs.push({
|
columnDefs.push({
|
||||||
title: "Open note",
|
title: "Open note button",
|
||||||
width: 40,
|
width: 40,
|
||||||
hozAlign: "center",
|
hozAlign: "center",
|
||||||
headerSort: false,
|
headerSort: false,
|
||||||
formatter: () => `<span class="bx bx-window-open"></span>`,
|
formatter: () => `<span class="bx bx-window-open"></span>`,
|
||||||
|
titleFormatter: emptyTitleFormatter,
|
||||||
cellClick: (e, cell) => {
|
cellClick: (e, cell) => {
|
||||||
const noteId = cell.getRow().getCell("noteId").getValue();
|
const noteId = cell.getRow().getCell("noteId").getValue();
|
||||||
if (noteId) {
|
if (noteId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user