mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
refactor(views/table): fix some type errors
This commit is contained in:
parent
d08225339c
commit
3de7b81be8
@ -1,6 +1,6 @@
|
||||
import type { CellComponent, ColumnComponent, MenuObject, Tabulator } from "tabulator-tables";
|
||||
import type { ColumnComponent, ColumnDefinition, MenuObject, Tabulator } from "tabulator-tables";
|
||||
|
||||
export function applyHeaderMenu(columns: ColumnComponent[]) {
|
||||
export function applyHeaderMenu(columns: ColumnDefinition[]) {
|
||||
for (let column of columns) {
|
||||
if (column.headerSort !== false) {
|
||||
column.headerMenu = headerMenu;
|
||||
@ -9,7 +9,7 @@ export function applyHeaderMenu(columns: ColumnComponent[]) {
|
||||
}
|
||||
|
||||
function headerMenu(this: Tabulator) {
|
||||
const menu: MenuObject<CellComponent>[] = [];
|
||||
const menu: MenuObject<ColumnComponent>[] = [];
|
||||
const columns = this.getColumns();
|
||||
|
||||
for (let column of columns) {
|
||||
|
@ -253,7 +253,7 @@ export default class TableView extends ViewMode<StateInfo> {
|
||||
this.api.replaceData(await buildRowDefinitions(this.parentNote, notes, info));
|
||||
|
||||
if (this.noteIdToEdit) {
|
||||
const row = this.api?.getRows(true).find(r => r.getData().noteId === this.noteIdToEdit);
|
||||
const row = this.api?.getRows().find(r => r.getData().noteId === this.noteIdToEdit);
|
||||
if (row) {
|
||||
row.getCell("title").edit();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user