import froca from "../../services/froca.js"; import renderTable from "./table_view/renderer.js"; import ViewMode, { ViewModeArgs } from "./view_mode"; const TPL = /*html*/`

Table view goes here.

`; export default class TableView extends ViewMode { private $root: JQuery; private $container: JQuery; private noteIds: string[]; constructor(args: ViewModeArgs) { super(args); this.$root = $(TPL); this.$container = this.$root.find(".table-view-container"); this.noteIds = args.noteIds; args.$parent.append(this.$root); } get isFullHeight(): boolean { return true; } async renderList() { const notes = await froca.getNotes(this.noteIds); this.$container.empty(); renderTable(this.$container[0], notes); return this.$root; } }