mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
bffed53182
commit
87bdffb3fa
1 changed files with 2 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
if (typeof viewID === "string") {
|
||||
newViewID = viewID;
|
||||
fetchPost("/api/av/setDatabaseBlockView", {id: e.dataset.nodeId, viewID});
|
||||
e.setAttribute("custom-sy-av-view", newViewID);
|
||||
} else if (typeof viewID === "undefined") {
|
||||
newViewID = e.querySelector(".av__header .item--focus")?.getAttribute("data-id");
|
||||
}
|
||||
|
|
@ -61,7 +62,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
created,
|
||||
snapshot,
|
||||
pageSize: parseInt(e.dataset.pageSize) || undefined,
|
||||
viewID: newViewID
|
||||
viewID: newViewID || e.getAttribute("custom-sy-av-view")
|
||||
}, (response) => {
|
||||
const data = response.data.view as IAVTable;
|
||||
if (!e.dataset.pageSize) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue