Vanessa 2025-08-22 17:29:52 +08:00
parent 0db4daf183
commit 00d80270a1
2 changed files with 4 additions and 4 deletions

View file

@ -66,7 +66,7 @@ ${fieldType === "block" ? ' data-detached="true"' : ""}>${renderCell(genCellValu
if (sideItemElement) {
sideItemElement.insertAdjacentHTML("afterend", html);
} else {
options.blockElement.querySelector(groupQuery + ".av__gallery").insertAdjacentHTML("afterbegin", html);
options.blockElement.querySelector(groupQuery + ".av__gallery")?.insertAdjacentHTML("afterbegin", html);
}
fetchPost("/api/av/getAttributeViewAddingBlockDefaultValues", {
avID: options.blockElement.getAttribute("data-av-id"),

View file

@ -131,9 +131,9 @@ export const insertAttrViewBlockAnimation = (options: {
if (bodyElement && ["updated", "created"].includes(bodyElement.getAttribute("data-dtype")) &&
bodyElement.getAttribute("data-content") !== "_@today@_") {
previousElement = options.blockElement.querySelector('.av__body[data-content="_@today@_"] .av__row--util')?.previousElementSibling;
if (!previousElement) {
return;
}
}
if (!previousElement) {
return;
}
let cellsHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;