mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
8d2e3bfd20
commit
7b2e48d54e
1 changed files with 38 additions and 25 deletions
|
@ -219,6 +219,17 @@ export const setFilter = async (options: {
|
|||
});
|
||||
return;
|
||||
}
|
||||
if (colData.rollup.calc?.operator && colData.rollup.calc.operator !== "Range") {
|
||||
if (["Count all", "Count empty", "Count not empty", "Count values", "Count unique values", "Percent empty",
|
||||
"Percent not empty", "Percent unique values", "Percent checked", "Percent unchecked", "Sum", "Average", "Median",
|
||||
"Min", "Max"].includes(colData.rollup.calc.operator)) {
|
||||
filterValue.type = "number";
|
||||
} else if (["Checked", "Unchecked"].includes(colData.rollup.calc.operator)) {
|
||||
filterValue.type = "checkbox";
|
||||
} else if (["Earliest", "Latest"].includes(colData.rollup.calc.operator)) {
|
||||
filterValue.type = "date";
|
||||
}
|
||||
} else {
|
||||
let targetAVId = "";
|
||||
fields.find((column) => {
|
||||
if (column.id === colData.rollup.relationKeyID) {
|
||||
|
@ -246,6 +257,8 @@ export const setFilter = async (options: {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
options.data.view.filters.find(item => {
|
||||
if (item.column === colData.id && item.value.type === "rollup") {
|
||||
if (!item.value.rollup || !item.value.rollup.contents || item.value.rollup.contents.length === 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue