mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 17:55:52 +01:00
feat(views/table): insert row before
This commit is contained in:
@@ -22,7 +22,17 @@ export function showRowContextMenu(_e: UIEvent, row: RowComponent, parentNote: F
|
||||
title: "Insert row above",
|
||||
uiIcon: "bx bx-list-plus",
|
||||
handler: () => {
|
||||
|
||||
const target = e.target;
|
||||
if (!target) {
|
||||
return;
|
||||
}
|
||||
const component = $(target).closest(".component").prop("component");
|
||||
component.triggerCommand("addNewRow", {
|
||||
customOpts: {
|
||||
target: "before",
|
||||
targetBranchId: rowData.branchId,
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user