mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
feat(book/table): support basic text columns
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
import { createGrid, AllCommunityModule, ModuleRegistry } from "ag-grid-community";
|
||||
import { buildColumnDefinitions, buildRowDefinitions } from "./data.js";
|
||||
import { buildData } from "./data.js";
|
||||
import FNote from "../../../entities/fnote.js";
|
||||
|
||||
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
||||
|
||||
export default function renderTable(el: HTMLElement, notes: FNote[]) {
|
||||
const rowData = buildRowDefinitions(notes);
|
||||
|
||||
export default function renderTable(el: HTMLElement, parentNote: FNote, notes: FNote[]) {
|
||||
createGrid(el, {
|
||||
// Row Data: The data to be displayed.
|
||||
rowData: rowData,
|
||||
// Column Definitions: Defines the columns to be displayed.
|
||||
columnDefs: buildColumnDefinitions()
|
||||
...buildData(parentNote, notes)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user