mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 21:18:07 +01:00
🚨
This commit is contained in:
parent
c8bb337ede
commit
2a8f8abc8d
11 changed files with 23 additions and 23 deletions
|
|
@ -549,7 +549,7 @@ export const renderCellAttr = (cellElement: Element, value: IAVCellValue) => {
|
|||
cellElement.setAttribute("data-detached", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const renderCell = (cellValue: IAVCellValue) => {
|
||||
let text = "";
|
||||
|
|
|
|||
|
|
@ -235,11 +235,11 @@ const filterItem = (listElement: Element, key: string) => {
|
|||
if (item.textContent.includes(key)) {
|
||||
item.classList.remove("fn__none");
|
||||
} else {
|
||||
item.classList.add("fn__none")
|
||||
item.classList.add("fn__none");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const bindRelationEvent = (options: {
|
||||
menuElement: HTMLElement,
|
||||
|
|
@ -290,9 +290,9 @@ export const bindRelationEvent = (options: {
|
|||
const cellRect = options.cellElements[options.cellElements.length - 1].getBoundingClientRect();
|
||||
setPosition(options.menuElement, cellRect.left, cellRect.bottom, cellRect.height);
|
||||
options.menuElement.querySelector(".b3-menu__items .b3-menu__item").classList.add("b3-menu__item--current");
|
||||
const inputElement = options.menuElement.querySelector("input")
|
||||
const inputElement = options.menuElement.querySelector("input");
|
||||
inputElement.focus();
|
||||
const listElement = options.menuElement.querySelector(".b3-menu__items")
|
||||
const listElement = options.menuElement.querySelector(".b3-menu__items");
|
||||
inputElement.addEventListener("keydown", (event) => {
|
||||
event.stopPropagation();
|
||||
if (event.isComposing) {
|
||||
|
|
@ -309,18 +309,18 @@ export const bindRelationEvent = (options: {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
})
|
||||
});
|
||||
inputElement.addEventListener("input", (event: InputEvent) => {
|
||||
if (event.isComposing) {
|
||||
return;
|
||||
}
|
||||
filterItem(listElement, inputElement.value);
|
||||
event.stopPropagation();
|
||||
})
|
||||
});
|
||||
inputElement.addEventListener("compositionend", (event) => {
|
||||
event.stopPropagation();
|
||||
filterItem(listElement, inputElement.value);
|
||||
})
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ export const setRelationCell = (protyle: IProtyle, nodeElement: HTMLElement, tar
|
|||
separatorElement.insertAdjacentHTML("afterend", genSelectItemHTML("empty"));
|
||||
}
|
||||
}
|
||||
menuElement.firstElementChild.classList.add("b3-menu__item--current")
|
||||
menuElement.firstElementChild.classList.add("b3-menu__item--current");
|
||||
}
|
||||
updateCellsValue(protyle, nodeElement, newValue, cellElements);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ style="width: ${index === 0 ? ((parseInt(column.width || "200") + 24) + "px") :
|
|||
return;
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/10262
|
||||
let checkClass = ""
|
||||
let checkClass = "";
|
||||
if (cell.valueType === "checkbox") {
|
||||
checkClass = cell.value?.checkbox?.checked ? " av__cell-check" : " av__cell-uncheck";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue