Skip to content

Commit c70db9f

Browse files
authored
style: Improve database entry select (#13575)
1 parent 59b4323 commit c70db9f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/src/protyle/gutter/index.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {hideTooltip} from "../../dialog/tooltip";
5252
import {appearanceMenu} from "../toolbar/Font";
5353
import {setPosition} from "../../util/setPosition";
5454
import {emitOpenMenu} from "../../plugin/EventBus";
55-
import {insertAttrViewBlockAnimation} from "../render/av/row";
55+
import {insertAttrViewBlockAnimation, updateHeader} from "../render/av/row";
5656
import {avContextmenu, duplicateCompletely} from "../render/av/action";
5757
import {getPlainText} from "../util/paste";
5858
import {addEditorToDatabase} from "../render/av/addToDatabase";
@@ -94,7 +94,10 @@ export class Gutter {
9494
return true;
9595
}
9696
});
97-
avElement.querySelector(`.av__row[data-id="${buttonElement.dataset.rowId}"]`).classList.add("av__row--select");
97+
const rowElement = avElement.querySelector(`.av__row[data-id="${buttonElement.dataset.rowId}"]`);
98+
rowElement.classList.add("av__row--select");
99+
rowElement.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconCheck");
100+
updateHeader(rowElement as HTMLElement);
98101
avElement.querySelectorAll(".av__row--select:not(.av__row--header)").forEach(item => {
99102
selectIds.push(item.getAttribute("data-id"));
100103
selectElements.push(item);
@@ -437,7 +440,7 @@ export class Gutter {
437440
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${buttonElement.getAttribute("data-node-id")}"]`)).find(item => {
438441
if (!isInEmbedBlock(item) && this.isMatchNode(item)) {
439442
const rowItem = item.querySelector(`.av__row[data-id="${buttonElement.dataset.rowId}"]`);
440-
Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl, av__row--hl")).forEach(hlItem => {
443+
Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl, .av__row--hl")).forEach(hlItem => {
441444
if (!item.isSameNode(hlItem)) {
442445
hlItem.classList.remove("protyle-wysiwyg--hl");
443446
}

0 commit comments

Comments
 (0)