Vanessa 2023-10-13 11:55:51 +08:00
parent af810b279d
commit 3554333da9
5 changed files with 32 additions and 7 deletions

View file

@ -159,7 +159,11 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
if (type === "updated" || type === "created" || (type === "block" && !cellElement.getAttribute("data-detached"))) {
selectRow(cellElement.parentElement.querySelector(".av__firstcol"), "toggle");
} else {
selectRow(cellElement.parentElement.querySelector(".av__firstcol"), "unselect");
cellElement.parentElement.parentElement.querySelectorAll(".av__row--select").forEach(item => {
item.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconUncheck");
item.classList.remove("av__row--select");
});
updateHeader(cellElement.parentElement);
popTextCell(protyle, [cellElement]);
}
event.preventDefault();

View file

@ -6,6 +6,7 @@ import {updateAttrViewCellAnimation} from "./action";
import {isCtrl} from "../../util/compatibility";
import {objEquals} from "../../../util/functions";
import {fetchPost} from "../../../util/fetch";
import {focusBlock} from "../../util/selection";
export const getCalcValue = (column: IAVColumn) => {
if (!column.calc || !column.calc.result) {
@ -523,6 +524,9 @@ const updateCellValue = (protyle: IProtyle, type: TAVCol, cellElements: HTMLElem
transaction(protyle, doOperations, undoOperations);
}
cellElements[0].classList.add("av__cell--select");
if (blockElement) {
focusBlock(blockElement);
}
setTimeout(() => {
avMaskElement.remove();
});