mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 21:48:06 +01:00
🚨
This commit is contained in:
parent
1c4718fcb9
commit
67f095c522
7 changed files with 26 additions and 26 deletions
|
|
@ -140,9 +140,9 @@ export const setFilter = async (options: {
|
|||
contents: [newValue],
|
||||
},
|
||||
type: "rollup"
|
||||
}
|
||||
};
|
||||
} else {
|
||||
newFilter.value = newValue
|
||||
newFilter.value = newValue;
|
||||
}
|
||||
let isSame = false;
|
||||
options.data.view.filters.find((filter, index) => {
|
||||
|
|
@ -225,7 +225,7 @@ export const setFilter = async (options: {
|
|||
type: filterValue.type
|
||||
};
|
||||
} else {
|
||||
filterValue = item.value.rollup.contents[0]
|
||||
filterValue = item.value.rollup.contents[0];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,10 +366,10 @@ export const openMenuPanel = (options: {
|
|||
}
|
||||
targetElement.classList.remove("dragover__bottom", "dragover__top");
|
||||
const blockIDs: string[] = [];
|
||||
const contents: IAVCellValue[] = []
|
||||
const contents: IAVCellValue[] = [];
|
||||
targetElement.parentElement.querySelectorAll(".fn__grab").forEach(item => {
|
||||
const dateElement = item.nextElementSibling as HTMLElement
|
||||
blockIDs.push(dateElement.dataset.id)
|
||||
const dateElement = item.nextElementSibling as HTMLElement;
|
||||
blockIDs.push(dateElement.dataset.id);
|
||||
contents.push({
|
||||
isDetached: !dateElement.style.color,
|
||||
type: "block",
|
||||
|
|
@ -377,8 +377,8 @@ export const openMenuPanel = (options: {
|
|||
content: dateElement.textContent,
|
||||
id: dateElement.dataset.id
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
updateCellsValue(options.protyle, options.blockElement as HTMLElement, {
|
||||
blockIDs,
|
||||
contents,
|
||||
|
|
|
|||
|
|
@ -237,11 +237,11 @@ const filterItem = (menuElement: Element, cellElement: HTMLElement, keyword: str
|
|||
const cells = response.data.rows.values as IAVCellValue[] || [];
|
||||
let html = "";
|
||||
let selectHTML = "";
|
||||
const hasIds: string[] = []
|
||||
const hasIds: string[] = [];
|
||||
cellElement.querySelectorAll("span").forEach((item) => {
|
||||
hasIds.push(item.dataset.id);
|
||||
selectHTML += `<button data-id="${item.dataset.id}" data-type="setRelationCell" class="b3-menu__item${item.textContent.indexOf(keyword) > -1 ? "" : " fn__none"}" draggable="true">${genSelectItemHTML("selected", item.dataset.id, !item.classList.contains("av__celltext--ref"), item.textContent || "Untitled")}</button>`;
|
||||
})
|
||||
});
|
||||
cells.forEach((item) => {
|
||||
if (!hasIds.includes(item.block.id)) {
|
||||
html += genSelectItemHTML("unselect", item.block.id, item.isDetached, item.block.content || "Untitled");
|
||||
|
|
@ -267,11 +267,11 @@ export const bindRelationEvent = (options: {
|
|||
const cells = response.data.rows.values as IAVCellValue[] || [];
|
||||
let html = "";
|
||||
let selectHTML = "";
|
||||
const hasIds: string[] = []
|
||||
const hasIds: string[] = [];
|
||||
options.cellElements[0].querySelectorAll("span").forEach((item) => {
|
||||
hasIds.push(item.dataset.id);
|
||||
selectHTML += `<button data-id="${item.dataset.id}" data-type="setRelationCell" class="b3-menu__item" draggable="true">${genSelectItemHTML("selected", item.dataset.id, !item.classList.contains("av__celltext--ref"), item.textContent || "Untitled")}</button>`;
|
||||
})
|
||||
});
|
||||
cells.forEach((item) => {
|
||||
if (!hasIds.includes(item.block.id)) {
|
||||
html += genSelectItemHTML("unselect", item.block.id, item.isDetached, item.block.content || "Untitled");
|
||||
|
|
|
|||
|
|
@ -79,10 +79,10 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
if (!hasFilter) {
|
||||
data.filters.find(filterItem => {
|
||||
if (filterItem.value.type === item.type && item.id === filterItem.column) {
|
||||
hasFilter = true
|
||||
return true
|
||||
hasFilter = true;
|
||||
return true;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
if (!item.hidden) {
|
||||
if (item.pin) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue