diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 18ebc2f82..3e1094124 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -71,7 +71,6 @@ const updateCellValue = (protyle: IProtyle, cellElement: HTMLElement, type: TAVC [type]: {content: cellElement.textContent.trim()} } }]); - cellElement.textContent = inputElement.value; setTimeout(() => { avMaskElement.remove(); }); @@ -108,7 +107,6 @@ export const showHeaderCellMenu = (protyle: IProtyle, blockElement: HTMLElement, name: cellElement.textContent.trim(), type, }]); - cellElement.textContent = newValue; }); menu.addItem({ icon: getColIconByType(type), diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 3a11e0747..171b64af8 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -109,7 +109,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => { showHeaderCellMenu(protyle, item, item.querySelector(".av__row--header").lastElementChild.previousElementSibling as HTMLElement); }); }); - } else if (operation.action === "insertAttrViewBlock") { + } else { Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.parentID}"]`)).forEach((item: HTMLElement) => { item.removeAttribute("data-render"); avRender(item); diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index d76deffe8..c442a5128 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -651,7 +651,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b updateRef(protyle, operation.id); } else if (operation.action === "append") { reloadProtyle(protyle, false); - } else if (["addAttrViewCol", "insertAttrViewBlock"].includes(operation.action)) { + } else if (["addAttrViewCol", "insertAttrViewBlock", "updateAttrViewCol", "updateAttrViewCell"].includes(operation.action)) { refreshAV(protyle, operation); } };