From cc867ea27dc26079e62614863dd242d1a7f82be9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 13 Jul 2023 09:43:10 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/8664 --- app/src/protyle/render/av/cell.ts | 1 + app/src/protyle/render/av/openMenuPanel.ts | 4 ++-- app/src/protyle/render/av/select.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 6781f4faa..c4f070464 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -16,6 +16,7 @@ export const popTextCell = (protyle: IProtyle, cellElement: HTMLElement) => { openMenuPanel(protyle, blockElement, "select", {cellElement}); return; } + window.siyuan.menus.menu.remove(); document.body.insertAdjacentHTML("beforeend", `
${html}
`); diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts index 8a3788809..ff610df18 100644 --- a/app/src/protyle/render/av/openMenuPanel.ts +++ b/app/src/protyle/render/av/openMenuPanel.ts @@ -101,12 +101,12 @@ export const openMenuPanel = (protyle: IProtyle, transaction(protyle, [{ action: "updateAttrViewColOptions", id: options.cellElement.dataset.colId, - parentID: data.id, + avID: data.id, data: changeData, }], [{ action: "updateAttrViewColOptions", id: options.cellElement.dataset.colId, - parentID: data.id, + avID: data.id, data: oldData, }]); menuElement.innerHTML = getSelectHTML(data.view, options); diff --git a/app/src/protyle/render/av/select.ts b/app/src/protyle/render/av/select.ts index 2f01cca44..62dc28f73 100644 --- a/app/src/protyle/render/av/select.ts +++ b/app/src/protyle/render/av/select.ts @@ -192,7 +192,7 @@ export const setSelectCol = (protyle: IProtyle, data: IAVTable, options: { }], [{ action: "updateAttrViewColOptions", id: colId, - parentID: data.id, + avID: data.id, data: colOptions }]); colOptions.find((item, index) => { @@ -411,7 +411,7 @@ export const addSelectColAndCell = (protyle: IProtyle, data: IAVTable, options: transaction(protyle, [{ action: "updateAttrViewColOptions", id: colId, - parentID: data.id, + avID: data.id, data: colData.options }, { action: "updateAttrViewCell",