Vanessa 2024-03-04 17:42:54 +08:00
parent d519732c79
commit f2c2a7592c
14 changed files with 203 additions and 94 deletions

View file

@ -169,14 +169,17 @@ const updatePageSize = (options: {
return;
}
options.nodeElement.setAttribute("data-page-size", options.newPageSize);
const blockID = options.nodeElement.getAttribute("data-node-id")
transaction(options.protyle, [{
action: "setAttrViewPageSize",
avID: options.avID,
data: parseInt(options.newPageSize),
blockID
}], [{
action: "setAttrViewPageSize",
data: parseInt(options.currentPageSize),
avID: options.avID,
blockID
}]);
document.querySelector(".av__panel")?.remove();
};
@ -270,6 +273,7 @@ export const deleteRow = (blockElement: HTMLElement, protyle: IProtyle) => {
previousID: item.previousElementSibling?.getAttribute("data-id") || "",
srcIDs: [item.getAttribute("data-id")],
isDetached: item.querySelector('.av__cell[data-detached="true"]') ? true : false,
blockID: blockElement.dataset.nodeId
});
});
transaction(protyle, [{